Hey,
Install everything locally on your machine, not in Homestead. This includes the Laravel installer.
I would also have your npm modules and gulp stuff run outside of the VM too.
Cheers
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I've been running a site with Laravel 4.2 for a while. My local development environment is in Homestead running on a iMac. I've got a new project that I want to start with Spark.
I'm struggling to get Spark to install correctly... And I think it boils down to not knowing what to do where (inside the VM vs on the host, iMac, machine). Any pointers?
Somewhat related... Do I need to manually installed the Laravel 5.2 installer in homestead or is it already there? Or if I'm running some of these commands on the iMac...do I need to install the Laravel installer on the iMac?
So far, I've been trying to do everything inside the homestead vm (which is where I thought things should be done). Spark new fails when I try to run the NPM dependencies (errors below). Then gulp won't run (probably due to the npm issue).
Many thanks!
npm ERR! Linux 3.19.0-25-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v5.4.1
npm ERR! npm v3.3.12
npm ERR! path /home/vagrant/code/test/node_modules/.cli-table.DELETE/node_modules/colors
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/test/node_modules/.cli-table.DELETE/node_modules/colors' -> '/home/vagrant/code/test/node_modules/cli-table/node_modules/colors'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! Please include the following file with any support request:
npm ERR! /home/vagrant/code/test/npm-debug.log
gulp errors:
Would you like to run Gulp? (yes/no) [yes]:
> y
Running Gulp...
module.js:327
throw err;
^
Error: Cannot find module 'laravel-elixir'
at Function.Module._resolveFilename (module.js:325:15)
at Function.Module._load (module.js:276:25)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object.<anonymous> (/home/vagrant/code/test/gulpfile.js:1:76)
at Module._compile (module.js:397:26)
at Object.Module._extensions..js (module.js:404:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
Please or to participate in this conversation.