I am running a react single page application and use auth0-js for authentication. After updating the auth0 version to 9.7.2 I get this error:
(function (exports, require, module, __filename, __dirname) { import Authentication from './authentication';
^^^^^^
SyntaxError: Unexpected token import
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:616:28)
at Module._extensions..js (module.js:663:10)
at Object.require.extensions.(anonymous function) [as .js] (/AppDir/node_modules/babel-register/lib/node.js:152:7)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! appname-frontend@11.0.2 start: `babel-node index.jsx`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the appname-frontend@11.0.2 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
My package.json
...
"browserify": {
"transform": [
[
"babelify",
{
"presets": [
"env",
"stage-2",
"react"
]
}
]
]
},
"babel": {
"presets": [
"env",
"stage-2",
"react"
]
}
...