You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am getting the following error when adding this module to my project (tried searching around, but can't find anyone else with this problem on this module):
/myproject/node_modules/babel-plugin-react-autoprefix/index.js:10
let binding
^^^
SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:374:25)
at Module._extensions..js (module.js:417:10)
at Object.require.extensions.(anonymous function) [as .js] (/myproject/node_modules/babel-register/lib/node.js:152:7)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Module.require (module.js:354:17)
at require (internal/module.js:12:17)
at /myproject/node_modules/babel-core/lib/transformation/file/options/option-manager.js:174:20
at Array.map (native)
Adding a 'use strict'; to the index.js helps it get a bit further:
/myproject/node_modules/babel-plugin-react-autoprefix/index.js:112
module.exports = ({ types: t }) => ({
^
SyntaxError: Unexpected token {
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:374:25)
at Module._extensions..js (module.js:417:10)
at Object.require.extensions.(anonymous function) [as .js] (/myproject/node_modules/babel-register/lib/node.js:152:7)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Module.require (module.js:354:17)
at require (internal/module.js:12:17)
at /myproject/node_modules/babel-core/lib/transformation/file/options/option-manager.js:174:20
at Array.map (native)
Seems like it's using modern features, but the runtime is not expecting them. My .babelrc configuration is as follows:
I am getting the following error when adding this module to my project (tried searching around, but can't find anyone else with this problem on this module):
Adding a
'use strict';
to theindex.js
helps it get a bit further:Seems like it's using modern features, but the runtime is not expecting them. My
.babelrc
configuration is as follows:The text was updated successfully, but these errors were encountered: