3

I'm trying to install ReactFire with jspm. The command I use is:

jspm install npm:reactfire

It installs a bunch of dependencies, then gives this error:

warn Error on build
     Error: EPERM: operation not permitted, open 'C:\Users\aldel\AppData\Local\.jspm\packages\npm\firebase@3.1.0\app.js'
         at Error (native)

err  Error building package npm:firebase.

warn Installation changes not saved.

Sometimes it gives the error on auth.js instead of app.js (same directory). It seems like the whole directory (firebase@3.1.0, that is) is created by jspm when running the above command, so it seems like it gets created, and then is immediately inaccessible by its creator.

I've tried:

  • adding -f to the jspm command line
  • installing before or after Firebase, React, and React-Dom
  • running with administrator privileges
  • clearing caches in both npm and jspm
  • messing with file and directory permissions
  • (edit) adding various -o options to try to prevent the Firebase dependency from installing from npm

I also just noticed that the same error happens if I do jspm install npm:firebase. I think the problem above happens when Firebase is installed as a dependency of ReactFire. Just doing jspm install firebase installs it from github:firebase/firebase-bower, not from npm:firebase (maybe because npm:firebase doesn't work??).

So I think it's a problem with how npm:firebase gets downloaded and installed, and/or with how npm:reactfire depends on npm:firebase. But I'm not sure how to fix or work around it. I'm pretty new to npm and jspm.

And I'm on Windows. Sorry.

Any ideas?

aldel
  • 6,489
  • 1
  • 27
  • 32
  • Looks a lot like [http://stackoverflow.com/questions/33158793/error-installing-an-npm-library-with-jspm?rq=1](this), but that jspm bug was apparently resolved last October. I'm running the latest version of jspm. – aldel Jul 12 '16 at 20:46

2 Answers2

0

Well, it seemed to work fine when I finally thought to try:

jspm install reactfire=github:firebase/reactfire

I'm not sure why I didn't try that sooner, except that the documentation encourages using npm instead of github and seems to say that github packages don't usually work without special modifications or overrides (I haven't managed to figure out how that last part actually works).

aldel
  • 6,489
  • 1
  • 27
  • 32
  • I'm getting the same error message, but I'm using Aurelia rather than React and I'm getting the error doing `jspm install`. I had to update the dependencies of my package to use `firebase` v3.x rather than 2.3.2. It installed the earlier version without issue. – Jay Bienvenu Sep 15 '16 at 17:52
  • After further investigation, I suspect this is a bug in the `firebase` module itself. I stripped everything out of `package.json` except the call to `firebase`: ``` { "dependencies": { "firebase": "^3.4.0" }, "jspm": { "dependencies": { "firebase": "npm:firebase@3.4.0" }, "overrides": { "npm:core-js@1.2.6": { "main": "client/shim.min" } } } } ``` – Jay Bienvenu Sep 16 '16 at 13:19
0

This is apparently due to a bug in jspm. Try running the following steps: npm update jspm npm cache clear jspm cc jspm install -f -y

Jay Bienvenu
  • 3,069
  • 5
  • 33
  • 44