eslint-nibble: Error: Cannot find module 'babel/polyfill'
Hello,
Babel is actually required to run eslint-nibble, so it fails if Babel is not installed with this error :
module.js:338
throw err;
^
Error: Cannot find module 'babel/polyfill'
at Function.Module._resolveFilename (module.js:336:15)
at Function.Module._load (module.js:278:25)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (/home/.../my-project/node_modules/eslint-nibble/index.js:4:1)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module.runMain (module.js:501:10)
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Comments: 15 (8 by maintainers)
Commits related to this issue
- Fix useless require to Babel (fixes #6) — committed to cmalard/eslint-nibble by cmalard 9 years ago
- Merge pull request #7 from cmalard/master Fix useless require to Babel (fixes #6) — committed to IanVS/eslint-nibble by IanVS 9 years ago
to resolve this need to run below npm install
npm install --save-dev babel-polyfill
to resolve this, i ran the line below
npm install --save-dev babel-polyfillThen, I imported the file in my main entry “App.js”.
require("babel-polyfill");If you are not not, try navigating you “node_modules” folder and search for “node_modules\babel-polyfill”