auth0 / repo-supervisor

Scan your code for security misconfiguration, search for passwords and secrets. :mag:
MIT License
637 stars 88 forks source link

Getting errors while installing the cli #2

Closed anshumanbh closed 7 years ago

anshumanbh commented 7 years ago

I did npm install webpack and npm install webpack-node-externals. I then did a npm run build and I get this error:

~/personal/repo-supervisor[master !] > npm run build

> repo-supervisor@1.0.1 build /Users/abhartiya/personal/repo-supervisor
> webpack --config config/webpack.js

Hash: a1bdf202b31eea0a7be2
Version: webpack 2.6.1
Time: 306ms
     Asset     Size  Chunks             Chunk Names
webtask.js  2.08 kB       0  [emitted]  webtask
    cli.js  2.08 kB       1  [emitted]  cli
   [0] ./src/cli.js 1.56 kB {1} [built] [failed] [1 error]
   [1] ./src/index.js 1.56 kB {0} [built] [failed] [1 error]

ERROR in ./src/cli.js
Module build failed: Error: Couldn't find preset "es2015" relative to directory "/Users/abhartiya/personal/repo-supervisor"
    at /Users/abhartiya/personal/repo-supervisor/node_modules/babel-core/lib/transformation/file/options/option-manager.js:293:19
    at Array.map (native)
    at OptionManager.resolvePresets (/Users/abhartiya/personal/repo-supervisor/node_modules/babel-core/lib/transformation/file/options/option-manager.js:275:20)
    at OptionManager.mergePresets (/Users/abhartiya/personal/repo-supervisor/node_modules/babel-core/lib/transformation/file/options/option-manager.js:264:10)
    at OptionManager.mergeOptions (/Users/abhartiya/personal/repo-supervisor/node_modules/babel-core/lib/transformation/file/options/option-manager.js:249:14)
    at OptionManager.init (/Users/abhartiya/personal/repo-supervisor/node_modules/babel-core/lib/transformation/file/options/option-manager.js:368:12)
    at File.initOptions (/Users/abhartiya/personal/repo-supervisor/node_modules/babel-core/lib/transformation/file/index.js:212:65)
    at new File (/Users/abhartiya/personal/repo-supervisor/node_modules/babel-core/lib/transformation/file/index.js:135:24)
    at Pipeline.transform (/Users/abhartiya/personal/repo-supervisor/node_modules/babel-core/lib/transformation/pipeline.js:46:16)
    at transpile (/Users/abhartiya/personal/repo-supervisor/node_modules/babel-loader/lib/index.js:48:20)
    at Object.module.exports (/Users/abhartiya/personal/repo-supervisor/node_modules/babel-loader/lib/index.js:163:20)

ERROR in ./src/index.js
Module build failed: Error: Couldn't find preset "es2015" relative to directory "/Users/abhartiya/personal/repo-supervisor"
    at /Users/abhartiya/personal/repo-supervisor/node_modules/babel-core/lib/transformation/file/options/option-manager.js:293:19
    at Array.map (native)
    at OptionManager.resolvePresets (/Users/abhartiya/personal/repo-supervisor/node_modules/babel-core/lib/transformation/file/options/option-manager.js:275:20)
    at OptionManager.mergePresets (/Users/abhartiya/personal/repo-supervisor/node_modules/babel-core/lib/transformation/file/options/option-manager.js:264:10)
    at OptionManager.mergeOptions (/Users/abhartiya/personal/repo-supervisor/node_modules/babel-core/lib/transformation/file/options/option-manager.js:249:14)
    at OptionManager.init (/Users/abhartiya/personal/repo-supervisor/node_modules/babel-core/lib/transformation/file/options/option-manager.js:368:12)
    at File.initOptions (/Users/abhartiya/personal/repo-supervisor/node_modules/babel-core/lib/transformation/file/index.js:212:65)
    at new File (/Users/abhartiya/personal/repo-supervisor/node_modules/babel-core/lib/transformation/file/index.js:135:24)
    at Pipeline.transform (/Users/abhartiya/personal/repo-supervisor/node_modules/babel-core/lib/transformation/pipeline.js:46:16)
    at transpile (/Users/abhartiya/personal/repo-supervisor/node_modules/babel-loader/lib/index.js:48:20)
    at Object.module.exports (/Users/abhartiya/personal/repo-supervisor/node_modules/babel-loader/lib/index.js:163:20)
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! repo-supervisor@1.0.1 build: `webpack --config config/webpack.js`
npm ERR! Exit status 2
npm ERR! 
npm ERR! Failed at the repo-supervisor@1.0.1 build 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:
npm ERR!     /Users/abhartiya/.npm/_logs/2017-06-13T03_41_45_797Z-debug.log

Any idea what's going on here?

anshumanbh commented 7 years ago

Actually, nevermind, I think it worked. I had to install babel-preset-es2015 and babel-preset-stage-2. It would be nice to have a list of dependencies to install for the cli.

radekk commented 7 years ago

All dependencies are installed automatically when you run npm install command. Then you can trigger a build by npm run build and it should generate ready to use javascript file.