|

Laravel Homestead on Windows Issues

I really want to use Windows and Laravel Homestead as a dev environment so that I don’t have to keep pulling out my Macbook Pro when I’m at home. I have a 2015 iMac at home but I do want to utilize the better hardware on my PC. No matter how many times I try, I just can’t get it to work.

This post is meant for me to have notes on my latest attempts and results. Many seem to have success with Homestead and Windows. Laravel commands run fine but when it comes to NPM commands it just gives me problems.

The latest error is…

npm ERR! path /home/vagrant/myproject/node_modules/fsevents/build/Release/.deps/Users/eshanker/Code/fsevents/lib
npm ERR! code ETXTBSY
npm ERR! errno -26
npm ERR! syscall rmdir
npm ERR! ETXTBSY: text file is busy, rmdir ‘/home/vagrant/a1careportal/node_modules/fsevents/build/Release/.deps/Users/eshanker/Code/fsevents/lib’

npm ERR! A complete log of this run can be found in:
npm ERR! /home/vagrant/.npm/_logs/2018-01-27T18_23_45_986Z-debug.log

Some solutions say to use sudo but you’re not really supposed to so I did the solution found at https://docs.npmjs.com/getting-started/fixing-npm-permissions. That did not work so I used sudo anyway and still a problem.

I ran the command with sudo, –no-bin-links, and –no-optional. I even followed suggestions from https://stackoverflow.com/questions/45678817/error-etxtbsy-text-file-is-busy-on-npm-install. Still issues.

Once again, I have wasted an entire morning. I really want to use my PC hardware but don’t want to dual boot on Ubuntu. I have a spare Dell Inspiron running Ubuntu and I have my iMac and Macbook Pro. I guess I just want it to work. Oh well, when I get the itch to look into it again, I guess I’ll find another morning to waste time on it.

Update 2018-01-01: Problem Solved

I finally fixed the problem. I updated the package.json using code from another project. I noticed there was a new entry called “config”. I ended up copying the “scripts” and “config” section. Here’s what I have below.

"scripts": {
    "dev": "node node_modules/cross-env/dist/bin/cross-env.js NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
    "watch": "node node_modules/cross-env/dist/bin/cross-env.js NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
    "watch-poll": "node node_modules/cross-env/dist/bin/cross-env.js NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --watch-poll --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
    "hot": "node node_modules/cross-env/dist/bin/cross-env.js NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
    "production": "node node_modules/cross-env/dist/bin/cross-env.js NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
  },
  "config": {
    "webpack": "node_modules/laravel-mix/setup/webpack.config.js"
  },

Finally, Homestead works on Windows 10.

Similar Posts

3 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.