DomoApps / starter-kit

This is an advanced Domo App project starter (boilerplate).
MIT License
20 stars 9 forks source link

npm ERR! app-domo@0.0.1 clean: `rm -rf node_modules && npm install` npm ERR! Exit status 1 #69

Open josevelez opened 7 years ago

josevelez commented 7 years ago

I am trying to run the starter kit on windows 10 x64 and when I run npm run upload I got this error:

app-domo@0.0.1 upload C:\Users\jose\projects\DOMO_APP\ npm run clean && npm run build && cd dist/ && domo publish && cp manifest.json ../domo/ && cd ..

app-domo@0.0.1 clean C:\Users\jose\projects\DOMO_APP\ rm -rf node_modules && npm install

'rm' is not recognized as an internal or external command, operable program or batch file.

npm ERR! Windows_NT 10.0.14393 npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Users\jose\projects\DOMO_APP\node_modules\npm\bin\npm-cli.js" "run" "clean" npm ERR! node v6.11.0 npm ERR! npm v3.10.10 npm ERR! code ELIFECYCLE npm ERR! app-domo@0.0.1 clean: rm -rf node_modules && npm install npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the app-domo@0.0.1 clean script 'rm -rf node_modules && npm install'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the app-domo package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! rm -rf node_modules && npm install npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs app-domo npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls app-domo npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! C:\Users\jose\projects\DOMO_APP\npm-debug.log

npm ERR! Windows_NT 10.0.14393 npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "run" "upload" npm ERR! node v6.11.0 npm ERR! npm v3.10.10 npm ERR! code ELIFECYCLE npm ERR! app-domo@0.0.1 upload: npm run clean && npm run build && cd dist/ && domo publish && cp manifest.json ../domo/ && cd .. npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the app-domo@0.0.1 upload script 'npm run clean && npm run build && cd dist/ && domo publish && cp manifest.json ../domo/ && cd ..'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the app-domo package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! npm run clean && npm run build && cd dist/ && domo publish && cp manifest.json ../domo/ && cd .. npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs app-domo npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls app-domo npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! C:\Users\jose\projects\DOMO_APP\npm-debug.log

TASimpson commented 2 years ago

I am having this exact issue. Any fix for this?

diazd2 commented 2 years ago

I am having this exact issue. Any fix for this?

The issue has to do with the commands that are being run when you run the script npm run upload. That script is a shortcut for: npm run clean && npm run build && cd dist/ && domo publish && cp manifest.json ../domo/ && cd ..

And in there, the first script (npm run clean) is a shortcut for: rm -rf node_modules && npm install

Based on what I'm seeing in the logs, you're using Windows, and some of these commands (for example, rm) are only present on Unix systems (Linux, Mac OS, etc).

There are two possible ways to get it working, if you only have access to Windows:

  1. Rewrite the scripts so they use Windows-based commands (that is, the scripts on the package.json file), or
  2. Install a terminal in your Windows machine to run Unix commands: https://sun.iwu.edu/~mliffito/cs_codex/posts/unix-on-your-own-computer/