Last active
January 11, 2022 12:24
-
-
Save chapov/4fe71dacd1c00e9d60fd8385122baff0 to your computer and use it in GitHub Desktop.
Fix for cannot use import statement outside a module
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
npm install --save-dev @babel/core @babel/cli @babel/node @babel/preset-env @babel/plugin-transform-runtime | |
package.json | |
"scripts": { | |
"dev": "cross-env NODE_ENV=development CHOKIDAR_USEPOLLING=true nodemon server.js --exec babel-node", | |
}, | |
.babelrc | |
{ | |
"presets": ["@babel/preset-env"], | |
"plugins": [ | |
["@babel/plugin-transform-runtime"] | |
] | |
} | |
this -s for Windows WSL2: | |
CHOKIDAR_USEPOLLING=true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment