JaneaSystems / nodejs-mobile-samples

Repository for demo applications that use Node.js on Mobile
MIT License
168 stars 111 forks source link

npm install error on windows for cordova-angularjs #9

Closed xeoshow closed 5 years ago

xeoshow commented 5 years ago

Hello,

I am trying to run npm install on windows for cordova-angularjs project, but met below error, how to resolve such problem? Thanks so much!


D:\gitrepository\nodejs-mobile-samples\cordova-angularjs>npm install

nodejs_cordova_angular@0.0.1 postinstall D:\gitrepository\nodejs-mobile-samples\cordova-angularjs npm run bower && npm run node-npm && echo $(tput setaf 3)Postinstall Complete!$(tput sgr0)

nodejs_cordova_angular@0.0.1 bower D:\gitrepository\nodejs-mobile-samples\cordova-angularjs echo $(tput setaf 3)Installing bower components...$(tput sgr0) && bower install

$(tput setaf 3)Installing bower components...$(tput sgr0)

nodejs_cordova_angular@0.0.1 node-npm D:\gitrepository\nodejs-mobile-samples\cordova-angularjs echo $(tput setaf 3)Running nodejs mobile install...$(tput sgr0) && pushd src/server && npm install --no-optional && popd

$(tput setaf 3)Running nodejs mobile install...$(tput sgr0) Command Syntax Error (命令语法不正确。)

npm ERR! Windows_NT 10.0.17134 npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "run" "node-npm" npm ERR! node v6.9.5 npm ERR! npm v3.10.10 npm ERR! code ELIFECYCLE npm ERR! nodejs_cordova_angular@0.0.1 node-npm: echo $(tput setaf 3)Running nodejs mobile install...$(tput sgr0) && pushd src/server && npm install --no-optional && popd npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the nodejs_cordova_angular@0.0.1 node-npm script 'echo $(tput setaf 3)Running nodejs mobile install...$(tput sgr0) && pushd src/server && npm install --no-optional && popd'. 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 nodejs_cordova_angular package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! echo $(tput setaf 3)Running nodejs mobile install...$(tput sgr0) && pushd src/server && npm install --no-optional && popd npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs nodejs_cordova_angular npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls nodejs_cordova_angular npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! D:\gitrepository\nodejs-mobile-samples\cordova-angularjs\npm-debug.log

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\chokidar\node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}) npm ERR! Windows_NT 10.0.17134 npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" npm ERR! node v6.9.5 npm ERR! npm v3.10.10 npm ERR! code ELIFECYCLE npm ERR! nodejs_cordova_angular@0.0.1 postinstall: npm run bower && npm run node-npm && echo $(tput setaf 3)Postinstall Complete!$(tput sgr0) npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the nodejs_cordova_angular@0.0.1 postinstall script 'npm run bower && npm run node-npm && echo $(tput setaf 3)Postinstall Complete!$(tput sgr0)'. 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 nodejs_cordova_angular package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! npm run bower && npm run node-npm && echo $(tput setaf 3)Postinstall Complete!$(tput sgr0) npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs nodejs_cordova_angular npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls nodejs_cordova_angular npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! D:\gitrepository\nodejs-mobile-samples\cordova-angularjs\npm-debug.log

D:\gitrepository\nodejs-mobile-samples\cordova-angularjs>

xeoshow commented 5 years ago

Problem resolved by using the cordova plugin and step by step directly.