js-assistant icon indicating copy to clipboard operation
js-assistant copied to clipboard

Issue with "import.meta" syntax

Open UserNobody14 opened this issue 1 year ago • 0 comments

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.

UserNobody14 avatar Feb 25 '24 23:02 UserNobody14