julianharty / testing-heuristics

Experiments to see if we can establish evidence of the value of testing heuristics
MIT License
3 stars 0 forks source link

npm start gets errors #24

Closed lisacrispin closed 7 years ago

lisacrispin commented 7 years ago

My teammate and I both tried npm install and npm start so we could look at the heuristics, but we both got errors. We're both on Mac OSX 10.12.5. My npm and node versions are listed at the bottom. My teammate tried other versions with no luck. Thank you!

npm start

testing-heuristics@1.0.0 start /Users/pivotal/workspace/testing-heuristics
npm run clean && npm run less && npm run build && npm run include && npm run makeZWFSFriendly && echo "\n\nOpen ./dist/index.html in a browser\n\n"

testing-heuristics@1.0.0 clean /Users/pivotal/workspace/testing-heuristics
rm ./dist/.html && rm ./dist/.css && rm -rf ./dist/A

rm: ./dist/*.html: No such file or directory

npm ERR! Darwin 16.6.0 npm ERR! argv "/usr/local/Cellar/node/7.9.0/bin/node" "/usr/local/bin/npm" "run" "clean" npm ERR! node v7.9.0 npm ERR! npm v4.2.0 npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! testing-heuristics@1.0.0 clean: rm ./dist/.html && rm ./dist/.css && rm -rf ./dist/A npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the testing-heuristics@1.0.0 clean script 'rm ./dist/.html && rm ./dist/.css && rm -rf ./dist/A'. 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 testing-heuristics package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! rm ./dist/.html && rm ./dist/.css && rm -rf ./dist/A npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs testing-heuristics npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls testing-heuristics npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! /Users/pivotal/.npm/_logs/2017-06-22T19_56_19_935Z-debug.log

npm ERR! Darwin 16.6.0 npm ERR! argv "/usr/local/Cellar/node/7.9.0/bin/node" "/usr/local/bin/npm" "start" npm ERR! node v7.9.0 npm ERR! npm v4.2.0 npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! testing-heuristics@1.0.0 start: npm run clean && npm run less && npm run build && npm run include && npm run makeZWFSFriendly && echo "\n\nOpen ./dist/index.html in a browser\n\n" npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the testing-heuristics@1.0.0 start script 'npm run clean && npm run less && npm run build && npm run include && npm run makeZWFSFriendly && echo "\n\nOpen ./dist/index.html in a browser\n\n"'. 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 testing-heuristics 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 less && npm run build && npm run include && npm run makeZWFSFriendly && echo "\n\nOpen ./dist/index.html in a browser\n\n" npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs testing-heuristics npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls testing-heuristics npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! /Users/pivotal/.npm/_logs/2017-06-22T19_56_19_954Z-debug.log

2017-06-22 13:56:19 ⌚ |ruby-2.2.6| cf:alpha/tracker shoshone in ~/workspace/testing-heuristics ± lc |master ✓| → npm --version 4.2.0

2017-06-22 13:56:45 ⌚ |ruby-2.2.6| cf:alpha/tracker shoshone in ~/workspace/testing-heuristics ± lc |master ✓| → node.js --version -bash: node.js: command not found

2017-06-22 13:56:50 ⌚ |ruby-2.2.6| cf:alpha/tracker shoshone in ~/workspace/testing-heuristics ± lc |master ✓| → node --version v7.9.0

ISNIT0 commented 7 years ago

Hey Lisa, Looks like the 'dist' folder wasn't present - I've pushed up a couple of changes which should fix that:

git pull origin master
npm start
lisacrispin commented 7 years ago

Hi Joe, so now I have a dist folder, but I still get the error. Hmm.

git pull origin master remote: Counting objects: 15, done. remote: Compressing objects: 100% (4/4), done. remote: Total 15 (delta 8), reused 15 (delta 8), pack-reused 0 Unpacking objects: 100% (15/15), done. From github.com:julianharty/testing-heuristics

testing-heuristics@1.0.0 start /Users/pivotal/workspace/testing-heuristics npm run clean && npm run less && npm run build && npm run include && npm run makeZWFSFriendly && echo "\n\nOpen ./dist/index.html in a browser\n\n"

testing-heuristics@1.0.0 clean /Users/pivotal/workspace/testing-heuristics rm ./dist/.html && rm ./dist/.css && rm -rf ./dist/A

rm: ./dist/*.html: No such file or directory

npm ERR! Darwin 16.6.0 npm ERR! argv "/usr/local/Cellar/node/7.9.0/bin/node" "/usr/local/bin/npm" "run" "clean" npm ERR! node v7.9.0 npm ERR! npm v4.2.0 npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! testing-heuristics@1.0.0 clean: rm ./dist/*.html && rm ./dist/*.css && rm -rf ./dist/A npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the testing-heuristics@1.0.0 clean script 'rm ./dist/.html && rm ./dist/.css && rm -rf ./dist/A'. 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 testing-heuristics package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! rm ./dist/.html && rm ./dist/.css && rm -rf ./dist/A npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs testing-heuristics npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls testing-heuristics npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! /Users/pivotal/.npm/_logs/2017-06-23T16_59_16_386Z-debug.log

npm ERR! Darwin 16.6.0 npm ERR! argv "/usr/local/Cellar/node/7.9.0/bin/node" "/usr/local/bin/npm" "start" npm ERR! node v7.9.0 npm ERR! npm v4.2.0 npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! testing-heuristics@1.0.0 start: npm run clean && npm run less && npm run build && npm run include && npm run makeZWFSFriendly && echo "\n\nOpen ./dist/index.html in a browser\n\n" npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the testing-heuristics@1.0.0 start script 'npm run clean && npm run less && npm run build && npm run include && npm run makeZWFSFriendly && echo "\n\nOpen ./dist/index.html in a browser\n\n"'. 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 testing-heuristics 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 less && npm run build && npm run include && npm run makeZWFSFriendly && echo "\n\nOpen ./dist/index.html in a browser\n\n" npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs testing-heuristics npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls testing-heuristics npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! /Users/pivotal/.npm/_logs/2017-06-23T16_59_16_406Z-debug.log

2017-06-23 10:59:16 ⌚ |ruby-2.2.6| cf:alpha/tracker shoshone in ~/workspace/testing-heuristics ± |master ✓| →

julianharty commented 7 years ago

I believe I've managed to fix the problem in https://github.com/julianharty/testing-heuristics/commit/e63661c845ec31e56ba7527aed9930e7a3c8e0d6

The 'clean' step was returning an error paradoxically because there was nothing to clean on a fresh installation of the code. I changed the bash operator (from && to ; which simply applies each command in sequence, and then added || true which causes the command to 'pass' regardless of whether the individual steps returned errors (because they didn't delete anything).

I've tested a fresh installation works as follows

git clone https://github.com/julianharty/testing-heuristics.git new
cd new
npm install
npm run start
ls -lart dist
ls -lart dist/A
open dist/index.html 

open launches the default browser on OSX. I think it'll do likewise on *nix systems. It's unlikely to work on Windows unless the bash shell is installed.