auspice icon indicating copy to clipboard operation
auspice copied to clipboard

npm install error related to fsevents

Open terrycojones opened this issue 4 years ago • 10 comments

Following https://nextstrain.github.io/auspice/introduction/install#installing-from-source after the git clone & cd auspice steps, I get:

$ npm install --global .
npm WARN checkPermissions Missing write access to /1GB/ncov/auspice/node_modules/fsevents
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules/auspice/node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN [email protected] requires a peer of eslint@^3.19.0 || ^4.3.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of eslint@^3.19.0 || ^4.5.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of eslint@^2.10.2 || ^3 || ^4 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of canvas@^2.5.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of bufferutil@^4.0.1 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of utf-8-validate@^5.0.2 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of react@^15.4.2 but none is installed. You must install peer dependencies yourself.

npm ERR! path /1GB/ncov/auspice/node_modules/fsevents
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall access
npm ERR! enoent ENOENT: no such file or directory, access '/1GB/ncov/auspice/node_modules/fsevents'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent 

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/terry/.npm/_logs/2020-03-28T10_52_16_817Z-debug.log

I do (for sure) have write access to /1GB/ncov/auspice/node_modules. I tried mkdir -p node_modules/fsevents and re-running the install command above, and got a little further. Many dirs then get created under node_modules, but the install fails again, ending with:

$ mkdir -p node_modules/fsevents
$ npm install --global .
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules/auspice/node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN enoent ENOENT: no such file or directory, open '/1GB/ncov/auspice/node_modules/fsevents/package.json'
npm WARN [email protected] requires a peer of eslint@^3.19.0 || ^4.3.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of eslint@^3.19.0 || ^4.5.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of eslint@^2.10.2 || ^3 || ^4 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of canvas@^2.5.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of bufferutil@^4.0.1 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of utf-8-validate@^5.0.2 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of react@^15.4.2 but none is installed. You must install peer dependencies yourself.

npm ERR! path /1GB/ncov/auspice/node_modules/fsevents/package.json
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall open
npm ERR! enoent ENOENT: no such file or directory, open '/1GB/ncov/auspice/node_modules/fsevents/package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent 

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/terry/.npm/_logs/2020-03-28T11_17_31_152Z-debug.log

At which point the dir I created is gone:

$ ls -la node_modules/fsevents
ls: cannot access 'node_modules/fsevents': No such file or directory

Thanks!

terrycojones avatar Mar 28 '20 11:03 terrycojones

Maybe Conda doesn't have linux's writing permission/access. Try running Conda with superuser's permission.

Try: sudo conda activate auspice before these steps

clouradev avatar Mar 29 '20 15:03 clouradev

Hi @clouraa conda is a shell function that is typically set up by one's ~/.bashrc (or the start-up file for whatever shell you use). Because sudo forks a new process (or calls exec) to run your command as root, your suggestion wouldn't work at all I don't think (because there would be no such command as conda). It's possible one could set the conda function to be exported and tell sudo to preserve that environment variable, but I wouldn't be surprised to discover that sudo didn't allow export of functions, and in any case the conda function has to be run by a shell (so you'd have to export it and run sudo bash conda or something like. And then all your newly installed files (assuming you got that far) would be owned by root... etc. In summary, using sudo not a good idea, in this case.

Anyway, thank you for for replying!

terrycojones avatar Mar 29 '20 18:03 terrycojones

I know we've had issues with fsevents before on different platforms, and from memory it was solved by moving away from a system nodejs install to a to conda nodejs -- but I can't remember more specifics. Would be great to solve this, or explicitly warn against a certain install method.

As a (potentially unrelated) aside, from the second error message, node_modules/auspice/node_modules doesn't seem right for an an auspice install on it's own.

jameshadfield avatar Mar 30 '20 03:03 jameshadfield

I tried mkdir -p node_modules/fsevents and re-running the install command above, and got a little further.

I would avoid overwriting a particular directory within node_modules.

Node and npm can be particularly finicky to install correctly.

What is the output of node --version and npm --version?

If you delete the node_modules directory for the auspice project and then rerun the npm install -g . command and auspice build, does that work for you?

willingc avatar Mar 30 '20 21:03 willingc

@terrycojones how did you end up getting auspice to install?

jameshadfield avatar Apr 08 '20 07:04 jameshadfield

I didn't end up solving this, I just went with a regular npm install --global auspice install.

@jameshadfield you were right, I think. There are quite a lot of results for this error if you do a web search, but I didn't try any of them.

@willingc - thank you. I've not tried your suggestions as I just went ahead with the regular install. I'll see if I can have another go. I have npm 6.4.1 and node v10.13.0.

terrycojones avatar Apr 08 '20 08:04 terrycojones

I am also facing issue similar to @terrycojones $ npm install --global. How to solve this and install auspice in centos7 machine. Thanks.

nitha26 avatar Nov 03 '20 07:11 nitha26

Any progress on this?

michalkowalski94 avatar Feb 11 '21 14:02 michalkowalski94

Not from me unfortunately, as I've not been able to reproduce this (on MacOS).

jameshadfield avatar Feb 14 '21 23:02 jameshadfield

I'm back on OS X too now......

terrycojones avatar Feb 14 '21 23:02 terrycojones