After cloning the repository and running npm install, I'm unable to run npm run cli.
At first, I tried just running npm run cli and I saw this error message:
> prettier-standard@8.0.0 cli /Users/maecapozzi/Desktop/Codes/prettier-standard
> babel-node src/index.js
/Users/maecapozzi/Desktop/Codes/prettier-standard/node_modules/babel-core/lib/transformation/file/options/option-manager.js:328
throw e;
^
Error: Using `babel-preset-react-app` requires that you specify `NODE_ENV` or `BABEL_ENV` environment variables. Valid values are "development", "test", and "production". Instead, received: undefined. (While processing preset: "/Users/maecapozzi/Desktop/Codes/prettier-standard/node_modules/babel-preset-node-module/index.js")
at buildPreset (/Users/maecapozzi/Desktop/Codes/prettier-standard/node_modules/babel-preset-node-module/index.js:48:11)
at /Users/maecapozzi/Desktop/Codes/prettier-standard/node_modules/babel-core/lib/transformation/file/options/option-manager.js:317:46
at Array.map (native)
at OptionManager.resolvePresets (/Users/maecapozzi/Desktop/Codes/prettier-standard/node_modules/babel-core/lib/transformation/file/options/option-manager.js:275:20)
at OptionManager.mergePresets (/Users/maecapozzi/Desktop/Codes/prettier-standard/node_modules/babel-core/lib/transformation/file/options/option-manager.js:264:10)
at OptionManager.mergeOptions (/Users/maecapozzi/Desktop/Codes/prettier-standard/node_modules/babel-core/lib/transformation/file/options/option-manager.js:249:14)
at OptionManager.init (/Users/maecapozzi/Desktop/Codes/prettier-standard/node_modules/babel-core/lib/transformation/file/options/option-manager.js:368:12)
at compile (/Users/maecapozzi/Desktop/Codes/prettier-standard/node_modules/babel-register/lib/node.js:103:45)
at loader (/Users/maecapozzi/Desktop/Codes/prettier-standard/node_modules/babel-register/lib/node.js:144:14)
at Object.require.extensions.(anonymous function) [as .js] (/Users/maecapozzi/Desktop/Codes/prettier-standard/node_modules/babel-register/lib/node.js:154:7)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! prettier-standard@8.0.0 cli: `babel-node src/index.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the prettier-standard@8.0.0 cli 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/maecapozzi/.npm/_logs/2018-02-10T20_07_49_143Z-debug.log
I then tried running NODE_ENV=development npm run cli --verbose and saw this error.
> prettier-standard@8.0.0 cli /Users/maecapozzi/Desktop/Codes/prettier-standard
> babel-node src/index.js
Prettier and standard brought together!
Usage
$ prettier-standard [<glob>...]
Options
--log-level Log level to use (default: warn)
Examples
$ prettier-standard 'src/**/*.js'
$ echo "const {foo} = "bar";" | prettier-standard
npm verb lifecycle prettier-standard@8.0.0~cli: unsafe-perm in lifecycle true
npm verb lifecycle prettier-standard@8.0.0~cli: PATH: /Users/maecapozzi/.nvm/versions/node/v8.0.0/lib/node_modules/npm/bin/node-gyp-bin:/Users/maecapozzi/Desktop/Codes/prettier-standard/node_modules/.bin:/Users/maecapozzi/.nvm/versions/node/v8.0.0/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
npm verb lifecycle prettier-standard@8.0.0~cli: CWD: /Users/maecapozzi/Desktop/Codes/prettier-standard
npm info lifecycle prettier-standard@8.0.0~cli: Failed to exec cli script
npm verb stack Error: prettier-standard@8.0.0 cli: `babel-node src/index.js`
npm verb stack Exit status 1
npm verb stack at EventEmitter.<anonymous> (/Users/maecapozzi/.nvm/versions/node/v8.0.0/lib/node_modules/npm/lib/utils/lifecycle.js:283:16)
npm verb stack at emitTwo (events.js:125:13)
npm verb stack at EventEmitter.emit (events.js:213:7)
npm verb stack at ChildProcess.<anonymous> (/Users/maecapozzi/.nvm/versions/node/v8.0.0/lib/node_modules/npm/lib/utils/spawn.js:40:14)
npm verb stack at emitTwo (events.js:125:13)
npm verb stack at ChildProcess.emit (events.js:213:7)
npm verb stack at maybeClose (internal/child_process.js:887:16)
npm verb stack at Process.ChildProcess._handle.onexit (internal/child_process.js:208:5)
npm verb pkgid prettier-standard@8.0.0
npm verb cwd /Users/maecapozzi/Desktop/Codes/prettier-standard
npm verb Darwin 15.6.0
npm verb argv "/Users/maecapozzi/.nvm/versions/node/v8.0.0/bin/node" "/Users/maecapozzi/.nvm/versions/node/v8.0.0/bin/npm" "run" "cli" "--verbose"
npm verb node v8.0.0
npm verb npm v5.0.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! prettier-standard@8.0.0 cli: `babel-node src/index.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the prettier-standard@8.0.0 cli script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm verb exit [ 1, true ]
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/maecapozzi/.npm/_logs/2018-02-10T20_10_47_521Z-debug.log
This is my first time trying to run a command line application, so please forgive me if I'm making a mistake. Should I be able to run this script?
After cloning the repository and running
npm install
, I'm unable to runnpm run cli
.At first, I tried just running
npm run cli
and I saw this error message:I then tried running
NODE_ENV=development npm run cli --verbose
and saw this error.This is my first time trying to run a command line application, so please forgive me if I'm making a mistake. Should I be able to run this script?