Skip to content

Issue with "import.meta" syntax #79

@UserNobody14

Description

@UserNobody14

When running the react component refactor in a file with "import.meta.env.WHATEVER" or some other vite env import, I'm getting this issue:

[ERROR] Error: createSingleInteractiveEdit for node 1102-1769-JsxElement failed: forEachChildWithAttribute: unsupported syntax type MetaProperty
    at t.CodeAssistEngine.createSingleInteractiveEdit (/home/benjamin/.vscode/extensions/p42ai.refactor-3.0.1/server/dist/server-node.js:2:549856)
    at async t.TransformationResult.createCodeAssistAction (/home/benjamin/.vscode/extensions/p42ai.refactor-3.0.1/server/dist/server-node.js:2:570610)
    at async /home/benjamin/.vscode/extensions/p42ai.refactor-3.0.1/server/dist/server-node.js:2:1159853
[ERROR] apps/webapp/src/app/components/BuildInfo.tsx - No action received for code assist '0:extract-jsx-element:1102-1769-JsxElement:'.

If the import.meta statements are commented out, it works fine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions