web-starter-kit: `gulp serve` throws errors with new gulpfile
import fs from 'fs';
^^^^^^
SyntaxError: Unexpected reserved word
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Comments: 41 (8 by maintainers)
import fs from 'fs';
^^^^^^
SyntaxError: Unexpected reserved word
I had similar errors until I made a
.babelrcfile:I was getting:
I had a similar problem while trying to run
gulp serve. I have fixed two errors and am now running without problems. I post this as it may help others.I set up nodjs on my chromebox running Version 50.0.2661.103 (64-bit) Platform 7978.74.0 (Official Build) stable-channel panther Firmware Google_Panther.4920.24.26. I run Ubunty trusty in a chroot with Crouton, with node v4.4.5 I encountered two errors the first is mentioned above by speeQr. The download version of the Web starter kit 0.6.3 is apparantly not the same as the one on github via clone:
Using the dowload version gives errors such as this:
When I fixed this, using a clone of the github repository
google/web-starter-kit, I was stuck with this second error that is mentioned in a thread on stackoverflow. You can find the source here:.It gives errors such as this:
The solution is from the user: Yeoman on stackoverflow in the same thread. I fixed this by downgrading to gulp version 3.9.0. The downgrade proceeds like this:
npm install -g gulp@3.9.0Gulp version 3.9.0 is the version that is specified in the dependencies in package.json from the Web starter kit 0.6.3. I am not so familiar with the syntax in package.json, I am guessing
^3.9.0means 3.9.0 or higher, anybody familiar with that?Having fixed that too, everything runs fine.
@njt1982 Your
package.jsonshould look like:babel-cli,babel-coreandbabel-preset-es2015packages are required.๐ It work for me!!!
Tanks @xskif You save my sunday night :p
@xskif Glad itโs resolved ๐
itโs ok now, thank you