Please note that the Homestead issue tracker is reserved for bug reports and enhancements. We are not always able to debug Vagrant, Provider or Operating System issues, but will do our best to help. Thank you!
Versions
- Vagrant: 2.2.4
- Provider: Virtualbox v6..0.8 r130347
Host operating system
Arch Linux
Homestead.yaml
ip: 192.168.10.10 memory: 2048 cpus: 2 provider: virtualbox authorize: ~/.ssh/id_rsa.pub keys: - ~/.ssh/id_rsa folders: - map: /home/zack/Environments/foo to: /home/vagrant/code sites: - map: homestead.test to: /home/vagrant/code/public databases: - homestead features: - mariadb: false - ohmyzsh: false - webdriver: false name: foo hostname: foo
Vagrant destroy & up output
Gist
Expected behavior
Installation of laravel mix, etc.
Actual behavior
- Run NPM install
I receive the following output:
vagrant@foo:~/code$ npm install
npm ERR! path /home/vagrant/code/node_modules/cliui/node_modules/ansi-regex/package.json.3499778098
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall open
npm ERR! enoent ENOENT: no such file or directory, open '/home/vagrant/code/node_modules/cliui/node_modules/ansi-regex/package.json.3499778098'
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/vagrant/.npm/_logs/2019-07-15T14_34_13_985Z-debug.log
I saw issue #866 and specifically, this comment: #866 (comment)
SO I tried that, and got the following output:
vagrant@foo:~/code$ sudo npm install --global cross-env
/usr/bin/cross-env -> /usr/lib/node_modules/cross-env/dist/bin/cross-env.js
/usr/bin/cross-env-shell -> /usr/lib/node_modules/cross-env/dist/bin/cross-env-shell.js
+ cross-env@5.2.0
added 10 packages from 8 contributors in 0.662s
╭────────────────────────────────────────────────────────────────╮
│ │
│ New minor version of npm available! 6.9.2 → 6.10.1 │
│ Changelog: https://github.com/npm/cli/releases/tag/v6.10.1 │
│ Run npm install -g npm to update! │
│ │
╰────────────────────────────────────────────────────────────────╯
I figured i wouldn’t update yet and tried to install anyways, and got the following error:
vagrant@foo:~/code$ npm install
npm ERR! path /home/vagrant/code/node_modules/webpack-cli/node_modules/ansi-regex/package.json.1463230163
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall open
npm ERR! enoent ENOENT: no such file or directory, open '/home/vagrant/code/node_modules/webpack-cli/node_modules/ansi-regex/package.json.1463230163'
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/vagrant/.npm/_logs/2019-07-15T14_38_27_528Z-debug.log
So I updated node as the notice said and ran npm install again and it failed still, with the same error
I also tried to run npm update, tried cleaning the npm cache, and installing again, and still get the same error.
Composer update output
Steps to reproduce
- npm install
Содержание
- Can’t run npm install in homestead #1434
- Comments
- Versions
- Host operating system
- Homestead.yaml
- Vagrant destroy & up output
- Expected behavior
- Actual behavior
- Footer
- Unable to run npm install on clean install. #752
- Comments
- Versions
- Host operating system
- Homestead.yaml
- Issue
- Steps to reproduce
- Npm install error homestead
- Using npm on windows host will cause symlink errors #611
- Comments
- Versions
- Host operating system
- Homestead.yaml
- Expected behavior
- Make sure you have started vagrant on windows using a normal user. ie, you have NOT selected to run as administrator
- What should have happened?
- Actual behavior
- However:
- References
- ETXTBSY #922
- Comments
- Some steps I tried
- Versions
- Host operating system
- Homestead.yaml
- Expected behavior
- Actual behavior
- npm install
- Steps to reproduce
- References
Can’t run npm install in homestead #1434
Versions
- Vagrant: 2.2.9
- Provider: Virtualbox, 6.1.10 r138449 (Qt5.6.2)
- Homestead: most recent release branch.
Host operating system
Windows 10 Home 1903
Homestead.yaml
Vagrant destroy & up output
Expected behavior
I am following this tutorial as I try to learn Laravel. I would expect things to work smoothly.
Actual behavior
Running npm install causes this error:
I found this issue that points to this solution that supposedly solves the problem.
I added these lines to my vagranfile after Vagrant.configure :
But it doesn’t work. I destroy the VM and vagrant up again and npm install still fails.
What am I missing?
The text was updated successfully, but these errors were encountered:
Everything looks fine from here. I really don’t know. This seems to be a common issue with Windows & Virtualbox. My reccomendation is to always run these kinds of commands on your host OS because you’ll always have more RAM & CPUs there
@teleclimber I have overcome a number of these issues by starting homestead from an administrator command prompt (Right click on command prompt and select «Run as Administrator»).
If you have done it right the title of your command prompt should start with Administrator. Run your «homestead up» command there and things will probably work a bit more reliably.
OK, I’ll try these suggestions when I get the time again. Thanks for the help.
© 2023 GitHub, Inc.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Источник
Unable to run npm install on clean install. #752
Versions
- Vagrant: 2.0.1
- Provider: vagrant-vmware-fusion (5.0.4)
- Box laravel/homestead (v5.0.1)
Host operating system
MacOS High Sierra 10.13.1 (17B1003)
Homestead.yaml
ip: «192.168.10.10»
memory: 2048
cpus: 1
provider: vmware_fusion
/code/
to: /home/vagrant/code/
sites:
— map: hodgehill.test
to: /home/vagrant/code/hodgehill/public
Issue
NPM Install falls over with this error.
npm ERR! path /home/vagrant/code/hodgehill/node_modules/.acorn-dynamic-import.DELETE/node_modules/acorn
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename ‘/home/vagrant/code/hodgehill/node_modules/.acorn-dynamic-import.DELETE/node_modules/acorn’ -> ‘/home/vagrant/code/hodgehill/node_modules/acorn-dynamic-import/node_modules/acorn’
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/vagrant/.npm/_logs/2017-12-04T20_55_21_208Z-debug.log
Steps to reproduce
- vagrant destroy
- vagrant destroy
- vagrant ssh
- NPM Install
The text was updated successfully, but these errors were encountered:
Does the error happen when running NPM from your mac?
Источник
Npm install error homestead
npm ERR! tar.unpack untar error /home/vagrant/.npm/laravel-elixir/1.0.3/package.tgznnpm ERR! tar.unpack untar error /home/vagrant/.npm/gulp/3.8.11/package.tgznnpm ERR! Linux 3.16.0-23-genericnnpm ERR! argv «/usr/bin/node» «/usr/bin/npm» «install»nnpm ERR! node v0.12.2nnpm ERR! npm v2.7.4nnpm ERR! path /home/vagrant/Projects/dmca-app/node_modules/laravel-elixir/package.jsonnnpm ERR! code EPERMnnpm ERR! errno -1nnnpm ERR! Error: EPERM, chown ‘/home/vagrant/Projects/dmca-app/node_modules/laravel-elixir/package.json’nnpm ERR! at Error (native)nnpm ERR! < [Error: EPERM, chown ‘/home/vagrant/Projects/dmca-app/node_modules/laravel-elixir/package.json’]nnpm ERR! errno: -1,nnpm ERR! code: ‘EPERM’,nnpm ERR! path: ‘/home/vagrant/Projects/dmca-app/node_modules/laravel-elixir/package.json’,nnpm ERR! fstream_finish_call: ‘chown’,nnpm ERR! fstream_type: ‘File’,nnpm ERR! fstream_path: ‘/home/vagrant/Projects/dmca-app/node_modules/laravel-elixir/package.json’,nnpm ERR! fstream_class: ‘FileWriter’,nnpm ERR! fstream_stack: nnpm ERR! [ ‘/usr/lib/node_modules/npm/node_modules/fstream/lib/writer.js:308:19’,nnpm ERR! ‘/usr/lib/node_modules/npm/node_modules/graceful-fs/polyfills.js:143:7’,nnpm ERR! ‘FSReqWrap.oncomplete (evalmachine.:95:15)’ ] >nnpm ERR! nnpm ERR! Please try running this command again as root/Administrator.nnnpm ERR! Please include the following file with any support request:nnpm ERR! /home/vagrant/Projects/dmca-app/npm-debug.logn n
Don’t install it with sudo! There shouldn’t be a need to. n
npm config set prefix
Append to PATH in .bashrc or similar n
export PATH=»$PATH:$HOME/npm/bin»n n»,»bodyInMarkdown»:»Don’t install it with sudo! There shouldn’t be a need to.rn
rnnpm config set prefix
rnAppend to PATH in .bashrc or similarrn
I have the same error yet. Now, I can see a npm folder when run ls command in
. But, when I tried to install laravel-elixir with sudo or without sudo doesn’t work. n»,»bodyInMarkdown»:»I have the same error yet. Now, I can see a npm folder when run ls command in
I’ve run it using sudo many times and never had a problem. n
One thing I would recommend on Windows is (sudo) npm install —no-bin-links . This prevents the use of symbolic links that don’t work with Windows. n
EDIT, I should add, only use sudo when running from your VM. If running it from the Windows command line, omit sudo . n
Since my last comment I’ve come accross this tip for OSX (perhaps Linux as well) users. n
Run this in the terminal: n
sudo chown -R $USER /usr/localn n
rnsudo chown -R $USER /usr/localrn
I’ve just solved my problem. This was my code in package.json n
I don’t know why I had the first line but I checked others laravel installation and I can see this line. n
I removed the first line and that’s it. I run n
Источник
Using npm on windows host will cause symlink errors #611
Please note that the Homestead issue tracker is reserved for bug reports and enhancements. 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
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)
Create a new folder like /code/npmBug
Create a package.json file in it with the following
What should have happened?
Actual behavior
What actually happened?
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: #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!
The text was updated successfully, but these errors were encountered:
Источник
ETXTBSY #922
Since I have reinstalled my operating system, I can no longer install a NPM package in my box.
Now I turn to you because I have tried almost everything.
The error is already known. There are many solutions, but none helped me to install at least one package.
Some steps I tried
- run npm on clean install, everything up to date
- run npm i -g npm@5.6.0 which downgrades the npm to version 5.6.0
- fresh installation of homestead and laravel
- try with different boxes (one in project and a box outside of the project)
- npm install —no-bin-links
- npm i -g npm
- config.vm.provider «virtualbox» do |v| v.customize [«setextradata», :id, «VBoxInternal2/SharedFoldersEnableSymlinksCreate/vagrant», «1»] end
- npm install -f
- Github-NPM-20950
Versions
- Vagrant: 6.3.0
- Provider: Virtualbox
- Homestead: branch master
Host operating system
Homestead.yaml
Expected behavior
NPM should be able to install packages.
Actual behavior
npm install
npm WARN npm npm does not support Node.js v10.8.0
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npm can’t make any promises that npm will work with this version.
npm WARN npm Supported releases of Node.js are the latest release of 4, 6, 7, 8, 9.
npm WARN npm You can find the latest version at https://nodejs.org/
@ production /home/vagrant/code
cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js —no-progress —hide-modules —config=node_modules/laravel-mix/setup/webpack.config.js
events.js:167
throw er; // Unhandled ‘error’ event
^
Error: spawn node_modules/webpack/bin/webpack.js ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:230:19)
at onErrorNT (internal/child_process.js:407:16)
at process._tickCallback (internal/process/next_tick.js:63:19)
at Function.Module.runMain (internal/modules/cjs/loader.js:745:11)
at startup (internal/bootstrap/node.js:266:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:596:3)
Emitted ‘error’ event at:
at Process.ChildProcess._handle.onexit (internal/child_process.js:236:12)
at onErrorNT (internal/child_process.js:407:16)
[. lines matching original stack trace . ]
at bootstrapNodeJSCore (internal/bootstrap/node.js:596:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ production: cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js —no-progress —hide-modules —config=node_modules/laravel-mix/setup/webpack.config.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ production script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/vagrant/.npm/_logs/2018-08-10T13_55_31_942Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ prod: npm run production
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ prod script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/vagrant/.npm/_logs/2018-08-10T13_55_31_960Z-debug.log
Steps to reproduce
- Install Windows 10
- Install Virtualbox
- Install Vagrant
- Clone Homestead
- Init and configure Homestead
- Clone Laravel
- Run npm install
References
- exceptionshub
- Github-NPM-9979
- Github-Npm-20605
- Homestead-866
- . and so on
The text was updated successfully, but these errors were encountered:
Not sure how much help we’re going to be on this.
Please paste your Vagrantfile
Please paste the full output of running these commands from /home/vagrant/code :
Hello, thank you very much for spending time on this issue.
/code$ npm install npm WARN rollback Rolling back ***@***.*** failed (this is probably harmless): ETXTBSY: text file is busy, unlink ‘/home/vagrant/code/node_modules/abbrev/package.json.3533218038’ npm WARN rollback Rolling back ***@***.*** failed (this is probably harmless): ETXTBSY: text file is busy, unlink ‘/home/vagrant/code/node_modules/acorn-dynamic-import/package.json.1733404457’ npm WARN rollback Rolling back ***@***.*** failed (this is probably harmless): ETXTBSY: text file is busy, unlink ‘/home/vagrant/code/node_modules/acorn-dynamic-import/node_modules/acorn/package.json.3534752001’ npm WARN rollback Rolling back ***@***.*** failed (this is probably harmless): ETXTBSY: text file is busy, unlink ‘/home/vagrant/code/node_modules/ajv-keywords/package.json.4048504180’ npm WARN rollback Rolling back ***@***.*** failed (this is probably harmless): ETXTBSY: text file is busy, unlink ‘/home/vagrant/code/node_modules/adjust-sourcemap-loader/node_modules/camelcase/package.json.4125958182’ npm WARN rollback Rolling back ***@***.*** failed (this is probably harmless): ETXTBSY: text file is busy, unlink ‘/home/vagrant/code/node_modules/amdefine/package.json.3495638571’ npm WARN rollback Rolling back ***@***.*** failed (this is probably harmless): ETXTBSY: text file is busy, unlink ‘/home/vagrant/code/node_modules/ansi-regex/package.json.4286723812’ npm WARN rollback Rolling back ***@***.*** failed (this is probably harmless): ETXTBSY: text file is busy, unlink ‘/home/vagrant/code/node_modules/ansi-html/package.json.1606666357’ npm WARN rollback Rolling back ***@***.*** failed (this is probably harmless): ETXTBSY: text file is busy, unlink ‘/home/vagrant/code/node_modules/alphanum-sort/package.json.2478757196’ npm WARN rollback Rolling back ***@***.*** failed (this is probably harmless): ETXTBSY: text file is busy, unlink ‘/home/vagrant/code/node_modules/ansi-wrap/package.json.2595492549’ npm WARN rollback Rolling back ***@***.*** failed (this is probably harmless): ETXTBSY: text file is busy, unlink ‘/home/vagrant/code/node_modules/aproba/package.json.4170576557’ npm WARN rollback Rolling back ***@***.*** failed (this is probably harmless): ETXTBSY: text file is busy, unlink ‘/home/vagrant/code/node_modules/ansi-gray/package.json.3423865556’ npm WARN rollback Rolling back ***@***.*** failed (this is probably harmless): ETXTBSY: text file is busy, unlink ‘/home/vagrant/code/node_modules/archive-type/package.json.2243657005’ npm WARN rollback Rolling back ***@***.*** failed (this is probably harmless): ETXTBSY: text file is busy, unlink ‘/home/vagrant/code/node_modules/archive-type/node_modules/file-type/package.json.3641111460’ npm WARN rollback Rolling back ***@***.*** failed (this is probably harmless): ETXTBSY: text file is busy, unlink ‘/home/vagrant/code/node_modules/arr-flatten/package.json.3458930831’ npm WARN rollback Rolling back ***@***.*** failed (this is probably harmless): ETXTBSY: text file is busy, unlink ‘/home/vagrant/code/node_modules/arr-diff/package.json.2536690881’ npm WARN rollback Rolling back ***@***.*** failed (this is probably harmless): ETXTBSY: text file is busy, unlink ‘/home/vagrant/code/node_modules/arr-union/package.json.2980387820’ npm WARN rollback Rolling back ***@***.*** failed (this is probably harmless): ETXTBSY: text file is busy, unlink ‘/home/vagrant/code/node_modules/array-differ/package.json.3923987795’ npm WARN rollback Rolling back ***@***.*** failed (this is probably harmless): ETXTBSY: text file is busy, unlink ‘/home/vagrant/code/node_modules/array-find-index/package.json.2653698088’ npm WARN rollback Rolling back ***@***.*** failed (this is probably harmless): ETXTBSY: text file is busy, unlink ‘/home/vagrant/code/node_modules/array-flatten/package.json.225453374’ npm WARN rollback Rolling back ***@***.*** failed (this is probably harmless): ETXTBSY: text file is busy, unlink ‘/home/vagrant/code/node_modules/array-uniq/package.json.1358823576’ npm WARN rollback Rolling back ***@***.*** failed (this is probably harmless): ETXTBSY: text file is busy, unlink ‘/home/vagrant/code/node_modules/array-union/package.json.3110248508’ npm WARN rollback Rolling back ***@***.*** failed (this is probably harmless): ETXTBSY: text file is busy, unlink ‘/home/vagrant/code/node_modules/array-unique/package.json.857394355’ npm WARN rollback Rolling back ***@***.*** failed (this is probably harmless): ETXTBSY: text file is busy, unlink ‘/home/vagrant/code/node_modules/asap/package.json.1844131700’ npm WARN rollback Rolling back ***@***.*** failed (this is probably harmless): ETXTBSY: text file is busy, unlink ‘/home/vagrant/code/node_modules/assign-symbols/package.json.320233826’ npm WARN rollback Rolling back ***@***.*** failed (this is probably harmless): ETXTBSY: text file is busy, unlink ‘/home/vagrant/code/node_modules/ast-types/package.json.2563780366’ npm WARN rollback Rolling back ***@***.*** failed (this is probably harmless): ETXTBSY: text file is busy, unlink ‘/home/vagrant/code/node_modules/assert-plus/package.json.1547195921’ npm WARN rollback Rolling back ***@***.*** failed (this is probably harmless): ETXTBSY: text file is busy, unlink ‘/home/vagrant/code/node_modules/async-each/package.json.353144535’ npm WARN rollback Rolling back ***@***.*** failed (this is probably harmless): ETXTBSY: text file is busy, unlink ‘/home/vagrant/code/node_modules/async-each-series/package.json.288915879’ npm WARN rollback Rolling back ***@***.*** failed (this is probably harmless): ETXTBSY: text file is busy, unlink ‘/home/vagrant/code/node_modules/asynckit/package.json.213461718’ npm WARN rollback Rolling back ***@***.*** failed (this is probably harmless): ETXTBSY: text file is busy, unlink ‘/home/vagrant/code/node_modules/async-foreach/package.json.1555186804’ npm WARN rollback Rolling back ***@***.*** failed (this is probably harmless): ETXTBSY: text file is busy, unlink ‘/home/vagrant/code/node_modules/aws-sign2/package.json.621248267’ npm WARN rollback Rolling back ***@***.*** failed (this is probably harmless): ETXTBSY: text file is busy, unlink ‘/home/vagrant/code/node_modules/babel-plugin-syntax-async-functions/package.json.3781083655’ npm WARN rollback Rolling back ***@***.*** failed (this is probably harmless): ETXTBSY: text file is busy, unlink ‘/home/vagrant/code/node_modules/babel-code-frame/node_modules/ansi-styles/package.json.3101013630’ npm WARN rollback Rolling back ***@***.*** failed (this is probably harmless): ETXTBSY: text file is busy, unlink ‘/home/vagrant/code/node_modules/atob/package.json.2630077391’ npm WARN rollback Rolling back ***@***.*** failed (this is probably harmless): ETXTBSY: text file is busy, unlink ‘/home/vagrant/code/node_modules/babel-code-frame/node_modules/supports-color/package.json.1297393194’ npm WARN rollback Rolling back ***@***.*** failed (this is probably harmless): ETXTBSY: text file is busy, unlink ‘/home/vagrant/code/node_modules/babel-plugin-syntax-exponentiation-operator/package.json.2001068536’ npm WARN rollback Rolling back ***@***.*** failed (this is probably harmless): ETXTBSY: text file is busy, unlink ‘/home/vagrant/code/node_modules/aws4/package.json.1683651057’ npm WARN rollback Rolling back ***@***.*** failed (this is probably harmless): ETXTBSY: text file is busy, unlink ‘/home/vagrant/code/node_modules/babel-plugin-syntax-flow/package.json.4286610413’ npm WARN rollback Rolling back ***@***.*** failed (this is probably harmless): ETXTBSY: text file is busy, unlink ‘/home/vagrant/code/node_modules/babel-plugin-syntax-object-rest-spread/package.json.3269638813’ npm WARN rollback Rolling back ***@***.*** failed (this is probably harmless): ETXTBSY: text file is busy, unlink ‘/home/vagrant/code/node_modules/babel-plugin-syntax-jsx/package.json.1915752970’ npm WARN rollback Rolling back ***@***.*** failed (this is probably harmless): ETXTBSY: text file is busy, unlink ‘/home/vagrant/code/node_modules/babel-plugin-syntax-trailing-function-commas/package.json.3589691704’ npm WARN rollback Rolling back ***@***.*** failed (this is probably harmless): ETXTBSY: text file is busy, unlink ‘/home/vagrant/code/node_modules/babylon/package.json.615632171’ npm WARN rollback Rolling back ***@***.*** failed (this is probably harmless): ETXTBSY: text file is busy, unlink ‘/home/vagrant/code/node_modules/balanced-match/package.json.3838495647’ npm WARN rollback Rolling back ***@***.*** failed (this is probably harmless): ETXTBSY: text file is busy, unlink ‘/home/vagrant/code/node_modules/batch/package.json.3571334323’ npm WARN rollback Rolling back ***@***.*** failed (this is probably harmless): ETXTBSY: text file is busy, unlink ‘/home/vagrant/code/node_modules/base64-js/package.json.1460887819’ npm WARN rollback Rolling back ***@***.*** failed (this is probably harmless): ETXTBSY: text file is busy, unlink ‘/home/vagrant/code/node_modules/beeper/package.json.3883539289’ npm WARN rollback Rolling back ***@***.*** failed (this is probably harmless): ETXTBSY: text file is busy, unlink ‘/home/vagrant/code/node_modules/babel-code-frame/node_modules/supports-color/package.json.1297393194’ npm WARN rollback Rolling back ***@***.*** failed (this is probably harmless): ETXTBSY: text file is busy, unlink ‘/home/vagrant/code/node_modules/babel-core/node_modules/source-map/package.json.2284816037’ npm WARN rollback Rolling back ***@***.*** failed (this is probably harmless): ETXTBSY: text file is busy, unlink ‘/home/vagrant/code/node_modules/adjust-sourcemap-loader/node_modules/camelcase/package.json.4125958182’ npm ERR! path /home/vagrant/code/node_modules/ansi-gray/package.json.3423865556 npm ERR! code ETXTBSY npm ERR! errno -26 npm ERR! syscall rename npm ERR! ETXTBSY: text file is busy, rename ‘/home/vagrant/code/node_modules/ansi-gray/package.json.3423865556’ -> ‘/home/vagrant/code/node_modules/ansi-gray/package.json’ npm ERR! A complete log of this run can be found in: npm ERR! /home/vagrant/.npm/_logs/2018-08-11T13_23_26_420Z-debug.log — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.
Yes I did. several times. I tried to install with —save flag, without binary links. I run the install comand with sudo. Reinstalled everything.
Here is my Vagrantfile.
I connect to ssh via putty. Run as local admin, or via powershell, as local admin, too.
yarn works fine. it is only npm what cause this errors.
So the good news is I’ve been able to confirm what you’re seeing on my Windows 10 + Virtualbox machine.
The bad news is I don’t think it’s anything Homestead can fix. It seems to be an issue between NPM & Virtualbox.
One alternative I saw people try was using Yarn, this seemed to work for me:
If you don’t want to use yarn, my best workaround suggestion would be to install NPM on your windows machine and run NPM commands from your host OS.
Источник
При установке laravel 8 и при попытке запуска laravel mix начались появляться ошибки которые не давали по итогу запустить npm run dev.
Здесь описание ошибок (которые сохранил или запомнил) и последовательность шагов которые помогли решить проблему. Всё проводилось в vagrant homestead Win10.
Итак. Сначала при установке сыпались ошибки при выполнении команды npm install связанные со старой установленной версией nodejs и npm (у меня Homestead был давно установлен и уже под устарел). Исправились после обновления Homestead https://laravel.com/docs/8.x/homestead#updating-homestead. Во время обновления после команды init.bat, если хотите сохранить настройки Homestead, то на вопросе об обновлении файла Homestead.yaml ответьте отрицательно. Важно! Сделайте дамп БД сайтов, они удалятся во время обновления.
Необходимо обратить внимание! Далее все операции с установкой пакетов node js надо делать из командной строки под администратором. Перейдя в папку Homestead, запустив там vagrant up и перейдя по ssh командой vagrant ssh, где необходимо выбрать свой проект «cd code/my_project». Запуск из под админа так же решает ошибки символических ссылок подобные этой «EPROTO: protocol error, symlink ‘../@babel/parser/bin/babel-parser.js’ -> ‘/home/vagrant/code/absho/node_modules/.bin/parser’» при установке npm install.
После корректной установки командой npm install при запуске npm run dev вылезла ошибка «sh: 1: mix: not found». Исправление ошибки было таким:
— удаление папки node_modules
— очистка кеша npm
— установка последней версии laravel mix
npm install laravel—mix@latest |
— и чистая установка пакетов npm:
После этого на отсутствие команд «mix» перестало ругаться, но появилась новая проблема — «laravel mix [webpack-cli] Error: Cannot find module ‘@babel/preset-env’». Решение простое — установить этот модуль:
npm install —save—dev @babel/preset—env |
Правда этого всё равно оказалось недостаточно и стало не хватать «laravel mix [webpack-cli] Error: Cannot find module ‘@babel/core’», поэтому делаем команду:
npm install —save—dev babel—loader @babel/core |
Всё. На этом приключения с ошибками установки у меня закончились и laravel mix наконец-то запустился.