Skip to content
This repository has been archived by the owner on Feb 8, 2024. It is now read-only.

Gulp fails #157

Closed
knipknap opened this issue Jul 31, 2016 · 3 comments
Closed

Gulp fails #157

knipknap opened this issue Jul 31, 2016 · 3 comments

Comments

@knipknap
Copy link

I am trying to start a build using gulp in a freshly checked out repository (5171522). gulp fails, probably because babel isn't using the es2016 preset:

sam@beast:~/tinker/projects/fipla/djmat$ gulp
[12:17:53] Requiring external module babel-register
/home/sam/tinker/projects/fipla/djmat/gulpfile.babel.js:1
(function (exports, require, module, __filename, __dirname) { import autoprefixer from 'autoprefixer';
                                                              ^^^^^^

SyntaxError: Unexpected reserved word
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:374:25)
    at loader (/home/sam/tinker/projects/fipla/djmat/node_modules/babel-register/lib/node.js:148:5)
    at Object.require.extensions.(anonymous function) [as .js] (/home/sam/tinker/projects/fipla/djmat/node_modules/babel-register/lib/node.js:158:7)
    at Module.load (module.js:344:32)
    at Function.Module._load (module.js:301:12)
    at Module.require (module.js:354:17)
    at require (internal/module.js:12:17)
    at execute (/usr/local/lib/node_modules/gulp-cli/lib/versioned/^3.7.0/index.js:24:18)
    at Liftoff.handleArguments (/usr/local/lib/node_modules/gulp-cli/index.js:149:63)

The presets are installed however:

sam@beast:~/tinker/projects/fipla/djmat$ npm ls --depth=0
django-material@ /home/sam/tinker/projects/fipla/djmat
├── autoprefixer@6.3.7
├── babel@6.5.2
├── babel-preset-es2015@6.9.0
├── babel-preset-es2016@6.11.3
├── babel-register@6.11.6
├── datatables@1.10.12
├── datatables.net-fixedheader@3.1.2 (git://github.com/kmmbvnr/Dist-DataTables-FixedHeader.git#7d06ed1b2602afb7888662fb266437df121131f7)
├── datatables.net-responsive@2.1.0
├── gulp@3.9.1
├── gulp-babel@6.1.2
├── gulp-postcss@6.1.1
├── gulp-sass@2.3.2
├── material-design-icons@2.2.3
└── materialize-css@0.97.7

I see that the repoitory contains a .babelrc file, but perhaps it's not picked up?
Any hint how to fix this?

@kmmbvnr
Copy link
Collaborator

kmmbvnr commented Aug 7, 2016

Try npm run gulp

@knipknap
Copy link
Author

knipknap commented Aug 7, 2016

Still no luck:

$ npm run gulp

> django-material@ gulp /home/sam/tinker/projects/fipla/external/django-material
> gulp

[08:38:47] Requiring external module babel-register
/home/sam/tinker/projects/fipla/external/django-material/gulpfile.babel.js:1
(function (exports, require, module, __filename, __dirname) { import autoprefixer from 'autoprefixer';
                                                              ^^^^^^

SyntaxError: Unexpected reserved word
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:374:25)
    at loader (/home/sam/tinker/projects/fipla/external/django-material/node_modules/babel-register/lib/node.js:148:5)
    at Object.require.extensions.(anonymous function) [as .js] (/home/sam/tinker/projects/fipla/external/django-material/node_modules/babel-register/lib/node.js:158:7)
    at Module.load (module.js:344:32)
    at Function.Module._load (module.js:301:12)
    at Module.require (module.js:354:17)
    at require (internal/module.js:12:17)
    at Liftoff.handleArguments (/home/sam/tinker/projects/fipla/external/django-material/node_modules/gulp/bin/gulp.js:116:3)
    at Liftoff.<anonymous> (/home/sam/tinker/projects/fipla/external/django-material/node_modules/liftoff/index.js:198:16)

npm ERR! Linux 4.4.0-28-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "gulp"
npm ERR! node v4.2.6
npm ERR! npm  v3.5.2
npm ERR! code ELIFECYCLE
npm ERR! django-material@ gulp: `gulp`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the django-material@ gulp script 'gulp'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the django-material package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     gulp
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs django-material
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls django-material
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/sam/tinker/projects/fipla/external/django-material/npm-debug.log

kmmbvnr added a commit that referenced this issue Aug 7, 2016
@knipknap
Copy link
Author

awesome, thank you!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants