JuliaGizmos / InteractBase.jl

Build interactive HTML5 widgets in Julia
Other
27 stars 23 forks source link

Installation problem ... "EISDIR: illegal operation on a directory, read" upon "npm install" #57

Closed lyon-fnal closed 6 years ago

lyon-fnal commented 6 years ago

Hi - I'm having an installation problem with InteractBase...

julia> versioninfo()
Julia Version 0.6.4
Commit 9d11f62bcb (2018-07-09 19:09 UTC)
Platform Info:
  OS: macOS (x86_64-apple-darwin14.5.0)
  CPU: Intel(R) Core(TM) i7-4980HQ CPU @ 2.80GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell MAX_THREADS=16)
  LAPACK: libopenblas64_
  LIBM: libopenlibm
  LLVM: libLLVM-3.9.1 (ORCJIT, haswell)

julia> Pkg.add("InteractBase")
< stuff above >
INFO: Building InteractBase
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  664k  100  664k    0     0  3631k      0 --:--:-- --:--:-- --:--:-- 3631k
npm ERR! code EISDIR
npm ERR! errno -21
npm ERR! syscall read
npm ERR! EISDIR: illegal operation on a directory, read
< Failure notices below >

I can see in .julia/v0.6/InteractBase/deps/build.jl the failure happens at

run(`$npm install -y`)

and the failure happens when I run that by hand.

I tried adding --verbose to the command and it didn't shed much additional information.

julia> run(`$npm install --verbose`)
npm info it worked if it ends with ok
npm verb cli [ '/Users/lyon/.julia/v0.6/NodeJS/deps/bin/node-v8.10.0-darwin-x64/bin/node',
npm verb cli   '/Users/lyon/.julia/v0.6/NodeJS/deps/bin/node-v8.10.0-darwin-x64/lib/node_modules/npm/bin/npm-cli.js',
npm verb cli   'install',
npm verb cli   '--verbose' ]
npm info using npm@5.6.0
npm info using node@v8.10.0
npm verb config Skipping project config: /Users/lyon/.npmrc. (matches userconfig)
npm verb npm-session e2bcfb757c16565d
npm verb stack Error: EISDIR: illegal operation on a directory, read
npm verb cwd /Users/lyon/.julia/v0.6/InteractBase/deps
npm verb Darwin 17.6.0
npm verb argv "/Users/lyon/.julia/v0.6/NodeJS/deps/bin/node-v8.10.0-darwin-x64/bin/node" "/Users/lyon/.julia/v0.6/NodeJS/deps/bin/node-v8.10.0-darwin-x64/lib/node_modules/npm/bin/npm-cli.js" "install" "--verbose"
npm verb node v8.10.0
npm verb npm  v5.6.0
npm ERR! code EISDIR
npm ERR! errno -21
npm ERR! syscall read
npm ERR! EISDIR: illegal operation on a directory, read
npm verb exit [ -21, true ]

EISDIR seems to mean that it's trying to read a file that is actually a directory. I can't tell what it is trying to read.

Have you seen this before? I have a home-brew installed node and npm on my machine, but I don't think there's interference (for fun I tried using the same command with /usr/local/bin/npm and I get the same error).

Thanks in advance for any ideas! -- Adam

lyon-fnal commented 6 years ago

I completely uninstalled the homebrew node and npm and the problem persists.

piever commented 6 years ago

I should probably get rid of the npm dependency. Out of curiosity, were you able to install WebIO successfully? Also, npm should only be needed for LaTeX integration. Does InteractBase work apart from LaTeX or the whole installation process failed?

lyon-fnal commented 6 years ago

I figured it out. For some reason, I had an empty directory $HOME/package.json ... that's a directory, not a file. Apparently that confuses npm. Removing that directory made everything work. Yay! -- Adam

piever commented 6 years ago

Good to know! That seems like a very unlikely scenario: maybe I can keep npm dependency then, but do let me know if it creates more problems in the future.

ivanFlor3s commented 3 years ago

I have recently have this issue with every npm command, finally i realize that in the npm dir in PATH environment i have the .npmrc with a line cafile="DIR not a File" and I thoght all this time that the .npmrc file was in C:\Users\<My user>, I had this two .npmrc files the other was in C:\Users\{user}\AppData\local\npm