vue-cli icon indicating copy to clipboard operation
vue-cli copied to clipboard

`npm install --save firebase` fails with projects created with vue cli 3

Open CaptainYouz opened this issue 8 years ago • 6 comments

Version

3.0.5

Node and OS info

Node 11.0.0, Npm 6.4.1, Mac OS High Sierra 10.13.6

Steps to reproduce

  • create a new project with vue cli 3
  • try to add firebase with npm install --save firebase

What is expected?

Firebase should be installed.

What is actually happening?

Error on npm install Snapshot of logs:

2336 verbose stack Error: [email protected] install: `node-pre-gyp install --fallback-to-build --library=static_library`
2336 verbose stack Exit status 1
2336 verbose stack     at EventEmitter.<anonymous> (/Users/anas/.nvm/versions/node/v11.0.0/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
2336 verbose stack     at EventEmitter.emit (events.js:182:13)
2336 verbose stack     at ChildProcess.<anonymous> (/Users/anas/.nvm/versions/node/v11.0.0/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
2336 verbose stack     at ChildProcess.emit (events.js:182:13)
2336 verbose stack     at maybeClose (internal/child_process.js:962:16)
2336 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
2337 verbose pkgid [email protected]
2338 verbose cwd /Users/anas/Development/other/tmp/tmp-project
2339 verbose Darwin 17.7.0
2340 verbose argv "/Users/anas/.nvm/versions/node/v11.0.0/bin/node" "/Users/anas/.nvm/versions/node/v11.0.0/bin/npm" "install" "--save" "firebase"
2341 verbose node v11.0.0
2342 verbose npm  v6.4.1
2343 error code ELIFECYCLE
2344 error errno 1
2345 error [email protected] install: `node-pre-gyp install --fallback-to-build --library=static_library`
2345 error Exit status 1
2346 error Failed at the [email protected] install script.
2346 error This is probably not a problem with npm. There is likely additional logging output above.
2347 verbose exit [ 1, true ]

I tried to install Firebase in a non vue project, with the same node/npm versions and it works. When trying to add Firebase to a Vue project created with vue cli 3, after a vue create my-project command, Firebase installation failed. I've put a snapshot of npm logs. I can share the full logs in private if required.

CaptainYouz avatar Oct 30 '18 11:10 CaptainYouz

Same issue here, but this isn't relevant to vue-cli, but rather grpc & firebase - try posting it there?

vpiskunov avatar Oct 30 '18 21:10 vpiskunov

Hi @vpiskunov ! I was thinking to put it in firebase, but as I said in the comment, that does not appear when I run an npm install --save firebase on a non vue cli 3 project.

CaptainYouz avatar Oct 30 '18 21:10 CaptainYouz

Same issue here with vue cli 3 project + node 11.0.0 + firebase. downgrading to node 8.12 builds the project fine.

xaksis avatar Oct 31 '18 02:10 xaksis

See: https://github.com/grpc/grpc-node/issues/594

haoqunjiang avatar Oct 31 '18 14:10 haoqunjiang

IMO it's not related to vue-cli but a grpc & node v11 issue. So I'm closing this issue for now.

haoqunjiang avatar Oct 31 '18 14:10 haoqunjiang

It is a grpc & node v11 issue indeed. I had the same problem. Since I have nvm, I switched to node v8.5.0 and I was able to install firebase. Just give it a try.

guibot17 avatar Dec 05 '18 23:12 guibot17