vue-master-class icon indicating copy to clipboard operation
vue-master-class copied to clipboard

`npm install` fails

Open bingalls opened this issue 6 years ago • 9 comments

I am running npm i on OSX 10.11 & homebrew. Skipping the warnings:

  • node-pre-gyp ERR! Tried to download(403): https://storage.googleapis.com/grpc-precompiled-binaries/node/grpc/v1.10.1/node-v67-darwin-x64-unknown.tar.gz
  • ...
  • gyp ERR! System Darwin 15.6.0
  • ...
  • gyp ERR! node -v v11.1.0
  • gyp ERR! node-gyp -v v3.8.0 npm run dev
  • ERROR Failed to compile with 8 errors
  • This dependency was not found:
  • firebase in ./src/main.js, ./src/store/actions.js and 6 others
  • To install it, you can run: npm install --save firebase Installing firebase fails

wget https://storage.googleapis.com/grpc-precompiled-binaries/node/grpc/v1.10.1/node-v67-darwin-x64-unknown.tar.gz is HTTP 403 forbidden

bingalls avatar Nov 16 '18 07:11 bingalls

Option 1:

Try to remove node_modules directory from your project and run npm install command again.

However the error is:

firebase in ./src/main.js, ./src/store/actions.js and 6 others means it couldn't load firebase.

If it was widows, it could be the antivirus blocking the package, etc but in mac try the above step and it will work.

Option 2:

Make sure if the firebase package could be install, try this command only and see if you get any error:

npm install --save firebase

mohokh67 avatar Nov 16 '18 08:11 mohokh67

@mohokh67 Neither option works. Note that this is a new install. It looks that Google has no precompiled binaries for grpc, and node-gyp fails to compile it. This bug likely must be reported to Google, but I'm not sure how. Otherwise, I don't yet know how to disable Firebase, and get vue-master-class limping along, without its authentication.

bingalls avatar Nov 16 '18 14:11 bingalls

I followed the steps in https://grpc.io/docs/quickstart/node.html and was able to build & run the grpc example, so the problem is in Firebase, not grpc. Note that grpc has many open issues.

https://github.com/firebase/geofire-js also depends on Firebase. I was able to install it, and run the examples, so I cannot report a problem with firebase. Must I be registered with Firebase, to install the client?

bingalls avatar Nov 16 '18 16:11 bingalls

@mohokh67 I found a solution, by removing package-lock.json (and yarn.lock), modifying package.json with "@firebase/app": "^0.3.4", "firebase": "^5.5.8", then running npm up After running npm run dev, I see a mostly blank page, but with a disabled menu, and an endless progress spinner. npm db:seed does not work; I expect that I must read the chapter on configuring firebase

bingalls avatar Nov 19 '18 23:11 bingalls

Removing *.lock file was a good shout. during development there shouldn't be a big deal. Make sure for production this file shouldn't change as it keep all the installed packages version.

Make sure the firebase rules are correct: For development purpose:

"rules": {
    ".read": true,
    ".write": true,
    "users": {
      ".indexOn": ["usernameLower", "email"]
    }
  }
}

Also you should run npm run db:seed

mohokh67 avatar Nov 20 '18 06:11 mohokh67

@mohokh67 I created https://github.com/vueschool/vue-master-class/pull/8 which should close this issue. Note that other students on Slack also face this issue.

bingalls avatar Nov 20 '18 17:11 bingalls

It looks that, because precompiled grpc is not available for me, node-gyp compiler currently has problems for node > v9. Another solution is to set the node version in package.json: https://stackoverflow.com/questions/29349684/how-can-i-specify-the-required-node-js-version-in-packages-json

bingalls avatar Nov 21 '18 20:11 bingalls

OK, the solution to this problem is to add the following to the documentation: github/googleapis does not provide update binaries for node-grpc, and compiling the latest source is fraught with grief. The easiest solution is to roll back to the last supported version of node. For example, for Mac OSX 10.11 El Capitain: install nvm # node version manager

nvm install 9
nvm use 9
yarn cache clean
yarn

bingalls avatar Oct 08 '19 02:10 bingalls

I just subscribed to vueschool.io (yes I paid money) in order to learn from the masters, just to find out that this "vue-master-class" is in a broken state for nearly 5 years now.

This is truly sad, as every newcomer (who bought an online course to learn these things) has to first figure out on his own why this project does not work.

I would have guessed that over the years, the devs have found time to fix the setup issues OR at least update the Readme of this repository and explain what the newcomers have to do in order to get this project running.

CreativeWarlock avatar Jan 12 '23 17:01 CreativeWarlock