Warn user if code is not in PATH variable
otusweb opened this issue · 2 comments
otusweb commented
I'm on MacOS 10.13.2
node -v
v8.9.4
npm -v
4.6.1
When I run npm install --save-dev react-native-vscode-settings
, the command fails with
> react-native-vscode-settings@0.0.6 postinstall /Users/otusweb/Projects/reactnative/node_modules/react-native-vscode-settings
> code --install-extension vsmobile.vscode-react-native && code --install-extension formulahendry.auto-close-tag && code --install-extension formulahendry.auto-rename-tag && code --install-extension formulahendry.auto-complete-tag && code --install-extension dzannotti.vscode-babel-coloring && code --install-extension streetsidesoftware.code-spell-checker && code --install-extension naumovs.color-highlight && code --install-extension joelday.docthis && code --install-extension dbaeumer.vscode-eslint && code --install-extension flowtype.flow-for-vscode && code --install-extension waderyan.gitblame && code --install-extension eamodio.gitlens && code --install-extension SirTori.indenticator && code --install-extension Tyriar.lorem-ipsum && code --install-extension DavidAnson.vscode-markdownlint && code --install-extension IBM.output-colorizer && code --install-extension christian-kohler.path-intellisense && code --install-extension nwallace.peep && code --install-extension esbenp.prettier-vscode && code --install-extension 2gua.rainbow-brackets && code --install-extension EQuimper.react-native-react-redux && code --install-extension cssho.vscode-svgviewer && code --install-extension wayou.vscode-todo-highlight && code --install-extension robertohuertasm.vscode-icons && node script.js
sh: code: command not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! react-native-vscode-settings@0.0.6 postinstall: `code --install-extension vsmobile.vscode-react-native && code --install-extension formulahendry.auto-close-tag && code --install-extension formulahendry.auto-rename-tag && code --install-extension formulahendry.auto-complete-tag && code --install-extension dzannotti.vscode-babel-coloring && code --install-extension streetsidesoftware.code-spell-checker && code --install-extension naumovs.color-highlight && code --install-extension joelday.docthis && code --install-extension dbaeumer.vscode-eslint && code --install-extension flowtype.flow-for-vscode && code --install-extension waderyan.gitblame && code --install-extension eamodio.gitlens && code --install-extension SirTori.indenticator && code --install-extension Tyriar.lorem-ipsum && code --install-extension DavidAnson.vscode-markdownlint && code --install-extension IBM.output-colorizer && code --install-extension christian-kohler.path-intellisense && code --install-extension nwallace.peep && code --install-extension esbenp.prettier-vscode && code --install-extension 2gua.rainbow-brackets && code --install-extension EQuimper.react-native-react-redux && code --install-extension cssho.vscode-svgviewer && code --install-extension wayou.vscode-todo-highlight && code --install-extension robertohuertasm.vscode-icons && node script.js`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the react-native-vscode-settings@0.0.6 postinstall 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/otusweb/.npm/_logs/2018-02-01T10_15_57_339Z-debug.log
Log file
2018-02-01T10_15_57_339Z-debug.log
otusweb commented
I figured out by re-reading the home page that VS code need to be in my path variable. Would be nice to precheck that this is the case and display an error to that effect before trying to install everything.
BTW, thanks for starting this, this makes my beginner's life a lot easier
shukerullah commented
Thanks, I will look into it.