wilfredmulenga / project-zed

A webpage with a list of projects done by Zambian Developers. A great place to showcase Zambian works as well as Open Source projects to contribute to.
https://project-zed-3d057.web.app/
MIT License
10 stars 7 forks source link

Getting npm ERR! Failed at the grpc@1.20.0 install script. #35

Closed Chizzoz closed 5 years ago

Chizzoz commented 5 years ago

After cloning WillzMu/projectZed repo, entering into projectZed folder and running npm install, the error pops up, npm ERR! Failed at the grpc@1.20.0 install script and some other errors, below is a screenshot.

I am using: node v12.6.0 npm 6.9.0

projectZed setup error

Kindly assist in resolving!

Chizzoz commented 5 years ago

So, after looking around, seems it's an issue with grpc@1.20.0 not supporting Node 12 and this ships with firebase-js-sdk. Issue here: Fails to build with node.js v12.0.0 release

I had to delete package-lock.json and ran npm install && npm start, web server ran fine with the error below:

$ npm start

> projectzed@0.1.0 start C:\REACT\projectZed
> react-scripts start

There might be a problem with the project dependency tree.
It is likely not a bug in Create React App, but something you need to fix locally.

The react-scripts package provided by Create React App requires a dependency:

  "eslint": "5.6.0"

Don't try to install it manually: your package manager does it automatically.
However, a different version of eslint was detected higher up in the tree:

  C:\REACT\projectZed\node_modules\eslint (version: 6.1.0)

Manually installing incompatible versions is known to cause hard-to-debug issues.

If prefer to ignore this check, add SKIP_PREFLIGHT_CHECK=true to an .env file in your project.
That will permanently disable this message but you might encounter other issues.

To fix the dependency tree, try following the steps below in the exact order:

  1. Delete package-lock.json (not package.json!) and/or yarn.lock in your project folder.
  2. Delete node_modules in your project folder.
  3. Remove "eslint" from dependencies and/or devDependencies in the package.json file in your project folder.
  4. Run npm install or yarn, depending on the package manager you use.

In most cases, this should be enough to fix the problem.
If this has not helped, there are a few other things you can try:

  5. If you used npm, install yarn (http://yarnpkg.com/) and repeat the above steps with it instead.
     This may help because npm has known issues with package hoisting which may get resolved in future versions.

  6. Check if C:\REACT\projectZed\node_modules\eslint is outside your project directory.
     For example, you might have accidentally installed something in your home folder.

  7. Try running npm ls eslint in your project folder.
     This will tell you which other package (apart from the expected react-scripts) installed eslint.

If nothing else helps, add SKIP_PREFLIGHT_CHECK=true to an .env file in your project.
That would permanently disable this preflight check in case you want to proceed anyway.

P.S. We know this message is long but please read the steps above :-) We hope you find them helpful!

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! projectzed@0.1.0 start: `react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the projectzed@0.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Chizzo\AppData\Roaming\npm-cache\_logs\2019-10-08T17_51_57_167Z-debug.log

After which, I created a .env file in root folder with SKIP_PREFLIGHT_CHECK=true. Making progress, but getting the error below:

./src/reducers/projectsReducer.js
Module not found: Can't resolve '../data' in 'C:\REACT\projectZed\src\reducers'

Are you able to provide the data?

wilfredmulenga commented 5 years ago

thanks @Chizzoz . Sorry to see you getting an error. did you try following the instructions in the screenshot: ` 1. Delete package-lock.json (not package.json!) and/or yarn.lock in your project folder.

  1. Delete node_modules in your project folder.
  2. Remove "eslint" from dependencies and/or devDependencies in the package.json file in your project folder.
  3. Run npm install or yarn, depending on the package manager you use.`

This could be because there is an eslint package in the project root directory and in the client folder. I would recommend following the rules above first. Let me know if it helps

Chizzoz commented 5 years ago

Hi! Yeah! That issue has been sorted, got it running. No got this issue:

./src/reducers/projectsReducer.js
Module not found: Can't resolve '../data' in 'C:\REACT\projectZed\src\reducers'

Can you provide the localized sample data?

Chizzoz commented 5 years ago

I think this issue has been resolved, closing it.