kentcdodds / bookshelf

Build a ReactJS App workshop
https://epicreact.dev/app
Other
2.64k stars 1.15k forks source link

node setup issues in "Build an Epic React App" module #316

Open adriannajmrocki opened 1 week ago

adriannajmrocki commented 1 week ago

Hello, Below you can find a console output after "node setup" command. I can't figure it out on my own. Glad if you can help me

anajmrocki@MacBook-Pro-anajmrocki bookshelf % node --version v18.20.3 anajmrocki@MacBook-Pro-anajmrocki bookshelf % node setup ▶️ Starting workshop setup... Running the following command: npx "https://gist.github.com/kentcdodds/bb452ffe53a5caa3600197e1d8005733" -q -- --no-autofill ▶️ Starting: System Validation Ensuring the correct versions of tools are installed on this computer. Running the following command: npx --yes "https://gist.github.com/kentcdodds/abbc32701f78fa70298d444c2303b6d9" ✅ Success: System Validation

▶️  Starting: Dependency Installation
      Installing third party code dependencies so the workshop works properly on this computer.
      Running the following command: npm install --legacy-peer-deps --no-save

npm warn deprecated source-map-resolve@0.6.0: See https://github.com/lydell/source-map-resolve#deprecated npm warn deprecated svgo@1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x. npm error code 1 npm error path /Users/anajmrocki/Desktop/epicreact/bookshelf/node_modules/husky npm error command failed npm error command sh -c node husky install npm error node:internal/modules/cjs/loader:451 npm error throw err; npm error ^ npm error npm error Error: Cannot find module '/Users/anajmrocki/Desktop/epicreact/bookshelf/node_modules/please-upgrade-node/index.js'. Please verify that the package.json has a valid "main" entry npm error at tryPackage (node:internal/modules/cjs/loader:443:19) npm error at Module._findPath (node:internal/modules/cjs/loader:711:18) npm error at Module._resolveFilename (node:internal/modules/cjs/loader:1126:27) npm error at Module._load (node:internal/modules/cjs/loader:981:27) npm error at Module.require (node:internal/modules/cjs/loader:1231:19) npm error at require (node:internal/modules/helpers:177:18) npm error at Object. (/Users/anajmrocki/Desktop/epicreact/bookshelf/node_modules/husky/husky.js:3:27) npm error at Module._compile (node:internal/modules/cjs/loader:1364:14) npm error at Module._extensions..js (node:internal/modules/cjs/loader:1422:10) npm error at Module.load (node:internal/modules/cjs/loader:1203:32) { npm error code: 'MODULE_NOT_FOUND', npm error path: '/Users/anajmrocki/Desktop/epicreact/bookshelf/node_modules/please-upgrade-node/package.json', npm error requestPath: 'please-upgrade-node' npm error } npm error npm error Node.js v18.20.3

npm error A complete log of this run can be found in: /Users/anajmrocki/.npm/_logs/2024-06-17T18_26_52_370Z-debug-0.log 🚨 Failure: Dependency Installation. Please review the messages above for information on how to troubleshoot and resolve this issue.

kentcdodds commented 1 week ago

Hmmm.... This is unexpected. I was unable to reproduce your issue. Could you try again? If that doesn't work could you try upgrading to Node 20?

adriannajmrocki commented 1 week ago

I tried again with the same result. I upgraded Node to v20 and here is the result:

anajmrocki@MacBook-Pro-anajmrocki bookshelf % node -v v20.14.0 anajmrocki@MacBook-Pro-anajmrocki bookshelf % node setup ▶️ Starting workshop setup... Running the following command: npx "https://gist.github.com/kentcdodds/bb452ffe53a5caa3600197e1d8005733" -q -- --no-autofill ▶️ Starting: System Validation Ensuring the correct versions of tools are installed on this computer. Running the following command: npx --yes "https://gist.github.com/kentcdodds/abbc32701f78fa70298d444c2303b6d9" ✅ Success: System Validation

▶️  Starting: Dependency Installation
      Installing third party code dependencies so the workshop works properly on this computer.
      Running the following command: npm install --legacy-peer-deps --no-save

npm warn deprecated source-map-resolve@0.6.0: See https://github.com/lydell/source-map-resolve#deprecated npm warn deprecated svgo@1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x. npm error code 1 npm error path /Users/anajmrocki/Desktop/epicreact/bookshelf/node_modules/husky npm error command failed npm error command sh -c node husky install npm error node:internal/modules/cjs/loader:453 npm error throw err; npm error ^ npm error npm error Error: Cannot find module '/Users/anajmrocki/Desktop/epicreact/bookshelf/node_modules/please-upgrade-node/index.js'. Please verify that the package.json has a valid "main" entry npm error at tryPackage (node:internal/modules/cjs/loader:445:19) npm error at Module._findPath (node:internal/modules/cjs/loader:716:18) npm error at Module._resolveFilename (node:internal/modules/cjs/loader:1131:27) npm error at Module._load (node:internal/modules/cjs/loader:986:27) npm error at Module.require (node:internal/modules/cjs/loader:1233:19) npm error at require (node:internal/modules/helpers:179:18) npm error at Object. (/Users/anajmrocki/Desktop/epicreact/bookshelf/node_modules/husky/husky.js:3:27) npm error at Module._compile (node:internal/modules/cjs/loader:1358:14) npm error at Module._extensions..js (node:internal/modules/cjs/loader:1416:10) npm error at Module.load (node:internal/modules/cjs/loader:1208:32) { npm error code: 'MODULE_NOT_FOUND', npm error path: '/Users/anajmrocki/Desktop/epicreact/bookshelf/node_modules/please-upgrade-node/package.json', npm error requestPath: 'please-upgrade-node' npm error } npm error npm error Node.js v20.14.0

npm error A complete log of this run can be found in: /Users/anajmrocki/.npm/_logs/2024-06-17T20_13_17_006Z-debug-0.log 🚨 Failure: Dependency Installation. Please review the messages above for information on how to troubleshoot and resolve this issue.

What else can I do?

kentcdodds commented 1 week ago

Dang. I'm really not sure what's going wrong here. It seems to be working for everyone else and in CI as well.

You can try to run things in the codesandbox or using the Dockerfile. Check the README with instructions for those alternative options.