Answers for "jest 28 syntaxerror: cannot use import statement outside a module"

0

cannot use import statement outside a module in jest

"scripts": {
    "test": "node --experimental-vm-modules node_modules/jest/bin/jest.js"
}
Posted by: Guest on August-03-2021
0

cannot use import statement outside a module in jest

export default {
    testEnvironment: 'jest-environment-node',
    transform: {}
 
};
Posted by: Guest on August-03-2021
5

cannot use import statement outside a module

//Add type=module to your index.js script tag (not just the package script tag)

<script type="module" src="./index.js"></script>
Posted by: Guest on September-26-2021

Code answers related to "jest 28 syntaxerror: cannot use import statement outside a module"

Code answers related to "Javascript"

Browse Popular Code Answers by Language