SyntaxError: Cannot use import statement outside a module #1900
Unanswered
1365996192
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
As a small component library to write unit tests, anyway this is wrong, and related to the error is NPM install external dependencies, an error in the recommended to inform developers to modify the code of this package, in addition to this there are other ways, such as any relevant configuration skip inspection of this item.
This is Vitest's automated advice:
Module D:Project/node_modules/.pnpm/@[email protected][email protected]/node_modules/@so/icons/lib/svg-react/acon.js:3 seems to be an ES Module but shipped in a CommonJS package. You might want to create an issue to the package "@so/icons" asking them to ship the file in .mjs extension or add "type": "module" in their package.json.
Beta Was this translation helpful? Give feedback.
All reactions