mlz
August 3, 2022, 9:57pm
1
Hi,
I am on win10-x64 with node 16.16.0 and npm 8.16.0, and get the following error when I try to install BJS:
(base) L:\Babylon.js>npm install
npm ERR! code EISDIR
npm ERR! syscall symlink
npm ERR! path L:\Babylon.js\packages\public\babylonjs-viewer-assets
npm ERR! dest L:\Babylon.js\node_modules\babylonjs-viewer-assets
npm ERR! errno -4068
npm ERR! EISDIR: illegal operation on a directory, symlink 'L:\Babylon.js\packages\public\babylonjs-viewer-assets' -> 'L:\Babylon.js\node_modules\babylonjs-viewer-assets'
I tried the command using the PowerShell as Administrator but still get the same error.
Any help would be appreciated.
Oh, that’s a first. Let’s see what’s going on.
Is that the first call of npm install
? does it try installing anything, or does it fail instantly? Can you try removing node_modules completely and re-run npm install? Is there some form of a lock on the node_modules directory?
mlz
August 4, 2022, 1:06pm
4
On the first call to npm install and any after. I did try removing npm_modules and re-run npm install. I even tried clearing the directory and doing new git clones a few times.
Seems related to the fact that symlink is not on windows.
I saw that other projects had similar issues with simlink:
Error: EISDIR: illegal operation on a directory, read · Issue #658 · facebook/metro · GitHub
Neo4j error: Project failed to create: Error: EISD... - Neo4j - 16616
The entire babylon team is using windows for development, and have never experienced that…
Weird. Seems to be related to the file system / os, but node (and npm) should take care of that.
Does this work for you?
opened 10:28PM - 13 Jul 17 UTC
closed 11:14PM - 13 Jul 17 UTC
Please note that the Homestead issue tracker is reserved for bug reports and enh… ancements. We are not always able to debug Vagrant, Provider or Operating System issues but will do our best to help. Thank you!
## Versions
- Vagrant: Run `vagrant -v` to show the version.
Vagrant 1.9.2
- Provider: Virtualbox, VMWare or Parallels and it's version.
VirtualBox
- Homestead: Run `homestead --version` to show the version.
5.3.2
## Host operating system
This is the operating system that you run locally.
Windows 10 64 bit.
## Homestead.yaml
```yaml
---
name: homestead7
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox
authorize: /Users/Jonathan/Dropbox/Documents/SSH-Keys/Homestead/homestead.pub
keys:
- /Users/Jonathan/<snip>/private.key
folders:
- map: /Code
to: /home/vagrant/Code
sites:
- map: new.app
to: /home/vagrant/Code/new.app/public
databases:
- homestead
ports:
- send: 80
to: 80
- send: 443
to: 443
```
## Expected behavior
Before you begin
#### Make sure you have started vagrant on windows using a normal user. ie, you have NOT selected to `run as administrator`
My npm verison is 5.0.3 (but has existed in all versions)
1) Create a new folder like /code/npmBug
2) Create a `package.json` file in it with the following
```json
{
"devDependencies": {
"babel-cli": "^6.24.1"
}
}
```
3) Save it then run `npm install`
### What should have happened?
```
21:43:08 ✔ vagrant@homestead $ npm install
> fsevents@1.1.2 install /home/vagrant/Code/npmbug/node_modules/fsevents
> node install
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN npmbug No description
npm WARN npmbug No repository field.
npm WARN npmbug No license field.
added 182 packages in 35.105s
```
## Actual behavior
What actually happened?
```
[~/Code/npmbug]
22:01:19 ✔ vagrant@homestead $ npm install
npm WARN npmbug No description
npm WARN npmbug No repository field.
npm WARN npmbug No license field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: node-pre-gyp@0.6.36 (node_modules/fsevents/node_modules/node-pre-gyp):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/home/vagrant/Code/npmbug/node_modules/fsevents/node_modules/node-pre-gyp' -> '/home/vagrant/Code/npmbug/node_modules/fsevents/node_modules/.node-pre-gyp.DELETE'
npm ERR! path ../babel-cli/bin/babel.js
npm ERR! code EPROTO
npm ERR! errno -71
npm ERR! syscall symlink
npm ERR! EPROTO: protocol error, symlink '../babel-cli/bin/babel.js' -> '/home/vagrant/Code/npmbug/node_modules/.bin/babel'
npm ERR! A complete log of this run can be found in:
npm ERR! /home/vagrant/.npm/_logs/2017-07-13T22_02_13_998Z-debug.log
```
#### However:
If we start Vagrant as a windows admin account (eg open command prompt by right clicking on cmd icon and selecting `Run as administrator`, then start vagrant/homestead as normal)
None of these issues then appear. All npm commands work and symlinks are created during the install process successfully.
I did attempt to use this PR: https://github.com/laravel/homestead/pull/609 and ran vagrant as a normal user. However when running the command `npm install` it again produced a symlink error and installation was a failure.
Because of this, I'm not sure if there's any real fix for windows hosts.
## References
Are there any other GitHub issues (open or closed) that should be linked here?
For example:
Basically there no need for me to write anything else as it's all covered here in the issue below!
https://github.com/npm/npm/issues/7308 but more specifically, everything after:
https://github.com/npm/npm/issues/7308#issuecomment-84214837
mlz
August 4, 2022, 1:55pm
6
I redid an installation from scratch using npm install --no-bin-links
and unfortunately still does not work:
Cloning into 'Babylon.js'...
remote: Enumerating objects: 350030, done.
remote: Counting objects: 100% (148/148), done.
remote: Compressing objects: 100% (106/106), done.
remote: Total 350030 (delta 59), reused 79 (delta 40), pack-reused 349882
Receiving objects: 100% (350030/350030), 4.41 GiB | 5.95 MiB/s, done.
Resolving deltas: 100% (280244/280244), done.
Updating files: 100% (3673/3673), done.
(base) L:\>cd Babylon.js
(base) L:\Babylon.js>npm install --no-bin-links
npm ERR! code EISDIR
npm ERR! syscall symlink
npm ERR! path L:\Babylon.js\packages\public\babylonjs-viewer-assets
npm ERR! dest L:\Babylon.js\node_modules\babylonjs-viewer-assets
npm ERR! errno -4068
npm ERR! EISDIR: illegal operation on a directory, symlink 'L:\Babylon.js\packages\public\babylonjs-viewer-assets' -> 'L:\Babylon.js\node_modules\babylonjs-viewer-assets'
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\martin\AppData\Local\npm-cache\_logs\2022-08-04T13_39_47_990Z-debug-0.log
I can continue searching, but eventually it is something with the file system - node.js - Ember.js Error: EISDIR: illegal operation on a directory - Stack Overflow
Something is different on your system than everyone else’s, but it is almost impossible to find the cause remotely. Do you have a problem with any other npm workspace repository?
mlz
August 4, 2022, 2:02pm
8
Do you have a problem with any other npm workspace repository?
The other repositories on that drive worked fine. Including projects using BJS. It is an external SSD drive.
I will try installing BJS on a different drive.
1 Like
mlz
August 4, 2022, 2:31pm
9
I tried installing BJS on a different drive and it worked!
It seems that nodejs has problems on windows with some type of drive or formatting.
Thanks for the help! Highly appreciated!
2 Likes