Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jest: node_modules/nuxt-shopify/lib/module.js #691

Open
ckhatton opened this issue Dec 17, 2021 · 1 comment
Open

Jest: node_modules/nuxt-shopify/lib/module.js #691

ckhatton opened this issue Dec 17, 2021 · 1 comment

Comments

@ckhatton
Copy link

Hi there

Since installing nuxt-shopify and running npm run test (jest), I am now receiving the error:

[fatal] Cannot use import statement outside a module

Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax.

Pointing to the error:

node_modules/nuxt-shopify/lib/module.js:1
({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,jest){import path from 'path';
^^^^^^

I've tried all matter of guides online to ignore it, but I can't suss it out myself.

"core-js": "^3.15.1",
"nuxt": "^2.15.3",
"nuxt-shopify": "^1.12.0"
"babel-core": "7.0.0-bridge.0",
"babel-jest": "^27.0.5",
"jest": "^27.3.1",
@Gomah
Copy link
Owner

Gomah commented Jan 7, 2022

Do you have a small reproduction with your jest configuration?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants