SyntaxError: Cannot use import statement outside a module #6181
Unanswered
namrataajmeri16
asked this question in
Q&A
Replies: 2 comments
-
@namrataajmeri16 have you solved this issue? |
Beta Was this translation helpful? Give feedback.
0 replies
-
@namrataajmeri16 @leandrobravo |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We are using node v16.16.0 and i tried to update axios from 0.24.0 to 1.6.3. It successfully gets updated but the jest test cases are failing.
.../node_modules/axios/index.js:1
({"Object.":function(module,exports,require,__dirname,__filename,global,jest){import axios from './lib/axios.js';
const mockAxios = jest.genMockFromModule('axios');
in package.json we haven't mentioned "type": "module"
Could anyone please look into this issue? This update is failing lot of our jest test cases.
Beta Was this translation helpful? Give feedback.
All reactions