cypress-tutorial-build-todo-starter icon indicating copy to clipboard operation
cypress-tutorial-build-todo-starter copied to clipboard

npm install fails. attempt to run fails.

Open joel-regen opened this issue 5 years ago • 4 comments

Mac OS X 10.14.6

joel@simon: ~/dev/cypress/tutorials/cypress-tutorial-build-todo-starter (master) $ ls LICENSE db.json package-lock.json routes.json

webpack.config.js README.md json-server.json package.json src joel@simon: ~/dev/cypress/tutorials/cypress-tutorial-build-todo-starter (master) $ npm install

[email protected] install /Users/joel/dev/cypress/tutorials/cypress-tutorial-build-todo-starter/node_modules/fsevents node install

node-pre-gyp ERR! Tried to download(404): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.2/fse-v1.1.2-node-v72-darwin-x64.tar.gz node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v72 ABI) (falling back to source compile with node-gyp) node-pre-gyp ERR! Tried to download(undefined): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.2/fse-v1.1.2-node-v72-darwin-x64.tar.gz node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v72 ABI) (falling back to source compile with node-gyp) SOLINK_MODULE(target) Release/.node SOLINK_MODULE(target) Release/.node CXX(target) Release/obj.target/fse/fsevents.o CXX(target) Release/obj.target/fse/fsevents.o In file included from In file included from ../fsevents.cc../fsevents.cc::66:

. . . many pages of spewing later ...

[email protected] postinstall /Users/joel/dev/cypress/tutorials/cypress-tutorial-build-todo-starter/node_modules/cypress node index.js --exec install

Cypress 3.7.0 is installed in /Users/joel/Library/Caches/Cypress/3.7.0

npm WARN [email protected] No repository field. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents): npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: node install npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

added 868 packages from 652 contributors and audited 4779 packages in 16.568s found 512 vulnerabilities (167 low, 15 moderate, 329 high, 1 critical) run npm audit fix to fix them, or npm audit for details

Then, later, when I try to run it:

json-server requires at least version 4 of Node, please upgrade [1] npm [1] ERR! code ELIFECYCLE [1] npm ERR! errno 1 [1] npm ERR! [1] [email protected] serve: json-server db.json [1] npm ERR! Exit status 1 [1] npm ERR! [1] npm ERR! [1] Failed at the [email protected] serve script. [1] npm ERR! This is probably not a problem with npm. There is likely additional logging output above. [1] [1] npm [1] ERR! A complete log of this run can be found in: [1] npm ERR! /Users/joel/.npm/_logs/2019-12-02T00_22_59_697Z-debug.log

but... joel@simon: ~/dev/cypress/tutorials/cypress-tutorial-build-todo-starter (master) $ node --version v12.12.0

joel-regen avatar Dec 02 '19 00:12 joel-regen

Hi @joel-regen i think the issue results from the fact that the starter project was bootstrapped over 2 years ago, most of the dependencies have been upgraded. i have taken the time to update the dependencies with newer versions and this solved the problem for me. here is a snapshot of my present Package.json file. i hope this helps

Screenshot 2020-01-04 at 12 43 07 PM

you can also copy the json below and replace you dependencies and devdepenedencies section of your package.json

"dependencies": { "axios": "^0.19.0", "concurrently": "^5.0.2", "json-server": "^0.15.1", "react": "^16.8.6", "react-dom": "^16.8.6", "react-router-dom": "^5.1.2", "webpack-cli": "^3.3.10" }, "devDependencies": { "@babel/core": "^7.7.5", "babel-loader": "^8.0.6", "@babel/plugin-proposal-object-rest-spread": "^7.7.7", "@babel/preset-env": "^7.7.7", "@babel/preset-react": "^7.7.4", "css-loader": "^3.4.1", "cypress": "^3.8.1", "html-webpack-plugin": "^3.2.0", "style-loader": "^1.1.2", "webpack": "^4.41.5" }

KunleMichaels avatar Jan 04 '20 11:01 KunleMichaels

this repo did not run from a direct clone. The webserver did not start. After running npm update, the webserver started.

Why not update packages in the repo rather than have a step not listed in the tutorial video? I get this after running npm install found 513 vulnerabilities (168 low, 15 moderate, 329 high, 1 critical)

richardson-marc avatar Jan 08 '20 13:01 richardson-marc

npm update and npm audit fix gets it running for me, but I agree that these should be fixed in the repo.

abraidotti avatar Jan 15 '20 16:01 abraidotti

I try remove package-lock.json then install and run success

phuocantd avatar Feb 19 '20 04:02 phuocantd