@tptompkins Did your npm install finish correctly? Maybe it didn't get all the necessary libraries? You could try running it again with "npm install --save" and then try gulp again?
Apr 15, 2016
7
Level 7
Spark or Elixir issue?
I followed the instructions in the docs for installing Spark using the spark-installer and I got it installed in Homestead:
localhost:~ tommytompkins$ homestead --version
Laravel Homestead version 2.2.1
vagrant@homestead:~$ spark
Laravel Spark Installer version 1.0.2
I also ran php artisan migrate and didn't have any issues. After I got it installed, I was able to load the main Spark site with the Spark logo but when I click on the Login button or Register button I get a blank screen.
I ran gulp and noticed the following error:
[01:34:15] gulp-notify: [Laravel Elixir] Browserify Failed!: Couldn't find preset "es2015" relative to directory "/home/vagrant/Code/sparktest/resources/assets/js" while parsing file: /home/vagrant/Code/sparktest/resources/assets/js/app.js
{ [Error: Couldn't find preset "es2015" relative to directory "/home/vagrant/Code/sparktest/resources/assets/js" while parsing file: /home/vagrant/Code/sparktest/resources/assets/js/app.js]
filename: '/home/vagrant/Code/sparktest/resources/assets/js/app.js',
stream:
Labeled {
_readableState:
ReadableState {
highWaterMark: 16,
buffer: [],
length: 0,
pipes: [Object],
pipesCount: 1,
flowing: true,
ended: false,
endEmitted: false,
reading: true,
sync: false,
needReadable: true,
emittedReadable: false,
readableListening: false,
objectMode: true,
defaultEncoding: 'utf8',
ranOut: false,
awaitDrain: 0,
readingMore: false,
decoder: null,
encoding: null,
resumeScheduled: false },
readable: true,
domain: null,
_events:
{ end: [Object],
error: [Object],
data: [Function: ondata],
_mutate: [Object] },
_eventsCount: 4,
_maxListeners: undefined,
_writableState:
WritableState {
highWaterMark: 16,
objectMode: true,
needDrain: false,
ending: true,
ended: true,
finished: true,
decodeStrings: true,
defaultEncoding: 'utf8',
length: 0,
writing: false,
corked: 0,
sync: false,
bufferProcessing: false,
onwrite: [Function],
writecb: null,
writelen: 0,
buffer: [],
pendingcb: 0,
prefinished: true,
errorEmitted: false },
writable: true,
allowHalfOpen: true,
_options: { objectMode: true },
_wrapOptions: { objectMode: true },
_streams: [ [Object] ],
length: 1,
label: 'deps' } }
[01:34:15] Finished 'browserify' after 2.87 s
[01:34:15] Starting 'copy'...
Any idea what's going on or how I can fix this?
Level 7
In order to solve this issue, I had to upgrade node and npm inside Homestead like so:
homestead ssh
sudo npm cache clean -f
sudo npm install -g n
sudo n stable
npm install -g npm
// Reboot the VM
homestead halt
homestead up
// Check versions
vagrant@homestead:~/Code/sparktest$ npm -v
3.8.3
vagrant@homestead:~/Code/sparktest$ node -v
v5.10.1
// install the missing presets
npm install babel-preset-es2015 --save
npm install babel-preset-react --save
// run gulp
vagrant@homestead:~/Code/sparktest$ gulp
BOOM! Finally fixed and now I can load the Login and Register screens. :)
6 likes
Please or to participate in this conversation.