You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello! Recently I've added v-perfect-signature to the project I'm writing and it's working great. I wanted to write some tests though, and got the following error.
FAIL src/tests/components/VComponent.spec.ts [ src/tests/components/VComponent.spec.ts ]
SyntaxError: Unexpected token 'export'
Module /project/node_modules/perfect-freehand/dist/esm/index.js:1 seems to be an ES Module but shipped in a CommonJS package. You might want to create an issue to the package "perfect-freehand" asking them to ship the file in .mjs extension or add "type": "module" in their package.json.
As a temporary workaround you can try to inline the package by updating your config:
I've made some research and found out this issue with perfect-freehand. As you can see, it has been resolved and pushed, although there wasn't any official release since the push. I've tested changing manually package.json in my node_modules to check, if this solution resolves my issue, and it does, so I assume it's just a matter of updating the dependency and potentially releasing new version for perfect-signature. I'm going to write about that in the mentioned issue too and hopefully they will do a release, so that it will just be matter of updating the version.
The text was updated successfully, but these errors were encountered:
Hello! Recently I've added v-perfect-signature to the project I'm writing and it's working great. I wanted to write some tests though, and got the following error.
FAIL src/tests/components/VComponent.spec.ts [ src/tests/components/VComponent.spec.ts ]
SyntaxError: Unexpected token 'export'
Module /project/node_modules/perfect-freehand/dist/esm/index.js:1 seems to be an ES Module but shipped in a CommonJS package. You might want to create an issue to the package "perfect-freehand" asking them to ship the file in .mjs extension or add "type": "module" in their package.json.
As a temporary workaround you can try to inline the package by updating your config:
I'm using vue 3 and vitest 0.34.4.
I've made some research and found out this issue with perfect-freehand. As you can see, it has been resolved and pushed, although there wasn't any official release since the push. I've tested changing manually package.json in my node_modules to check, if this solution resolves my issue, and it does, so I assume it's just a matter of updating the dependency and potentially releasing new version for perfect-signature. I'm going to write about that in the mentioned issue too and hopefully they will do a release, so that it will just be matter of updating the version.
The text was updated successfully, but these errors were encountered: