npm install fails with ERR_INVALID_ARG_TYPE on win11 host in ubruntu VirtualBox generic/ubuntu2204
Environment:
- Win 11
- Vagrant box: VirtualBox generic/ubuntu2204
- “../gloss-translation” is repo root directory on host machine.
Vagrantfile:
vb.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/~/gloss-translation", "1"]
config.vm.synced_folder "../gloss-translation", "/home/vagrant/gloss-translation"
sudo apt-get install nodejs -y
sudo apt-get -y install postgresql-14
# Provision section:
cd /home/vagrant/gloss-translation
npm install
Stdout Error Message:
vagrant@ubuntu2204:~/gloss-translation$ npm install
npm ERR! code ENOTSUP
npm ERR! syscall write
npm ERR! errno -95
npm ERR! ENOTSUP: operation not supported on socket, write
npm ERR! A complete log of this run can be found in: /home/vagrant/.npm/_logs/2023-10-03T14_08_28_991Z-debug-0.log
Excerpt of log file above:
56 timing command:install Completed in 170ms
57 verbose stack Error: ENOTSUP: operation not supported on socket, write
58 verbose cwd /home/vagrant/gloss-translation
59 verbose Linux 5.15.0-84-generic
60 verbose node v18.18.0
61 verbose npm v9.8.1
62 error code ENOTSUP
63 error syscall write
64 error errno -95
65 error ENOTSUP: operation not supported on socket, write
66 verbose exit -95
67 timing npm Completed in 581ms
68 verbose unfinished npm timer reify 1696342109381
69 verbose unfinished npm timer reify:save 1696342109541
70 verbose code -95
71 error A complete log of this run can be found in: /home/vagrant/.npm/_logs/2023-10-03T14_08_28_991Z-debug-0.log
What I have tried to date:
- Ran this command: VBoxManage.exe setextradata vagrant-project_default_1696285759671_47273 VBoxInternal2/SharedFoldersEnableSymlinksCreate/~/gloss-translation 1
- Granted create symbolic links to “Authenticated Users” using Local Security Policy
- Deleted directory “node_modules” in project root directory
- Created a directory in the guest ~/node_modules;
cd ~/gloss-translation; ln -s ~/node_modules; npm install
Result:
All of the above have failed.
Your help is greatly appreciated.
Read more here: Source link