Closed KarlGl closed 9 years ago
Thanks Karl!
you need babel-core
to have the gulp working properly. see here. I'm gonna add it to the documentation for clarification :)
Gulp can't seem to start without a gulpfile.js
though, so gulp bootstrap
can not run without a gulpfile ([gulp] No gulpfile found). Am I meant to run all the files through babel before doing this? Am I meant to generate the gulpfile.js
?
Have you done what was suggested in the previous comment?
Yeah I've got babel-core installed, my problem is running gulp without a gulpfile, the only gulpfile I have at the moment is gulpfile.babel.js
$ npm install babel-core
$ gulp bootstrap
[gulp] No gulpfile found
You have to install it globally!
npm install -g babel-core
Please consult google or stackoverflow for gulp related questions.
I still have the same problem with running gulp without a gulpfile.js. Sorry if this type of question is annoying but if I manage to get it running I'll make a PR for the readme.
Is there some kind of task that puts the gulpfile.babel.js and the lib directory through babel, that I need to run before I can run gulp bootstrap
? If not, how does the gulp task know to read gulpfile.babel.js
?
This is something that depends on your system configuration and/or modules you have installed. That is why I might not be able to help you here. The only thing that I can think of is to run npm install
first.
Btw. I have already added the babel-core
to the README.
Thanks! Updating gulp to 3.9.0 fixed it for me. Gulp now runs with the external module babel-core/register. I also had to install the following package so maybe add this to the package.json?
"npm": "^2.14.2"
Thanks again.
Glad that it finally worked out for you :) I suppose I need to add an extra page dedicated to this issue. Other people also seems to be confused with the gulp.babel.js
.
I still cannot bootstrap. Maybe of note is that I am using nvm. Also ref: https://github.com/yeoman/generator-gulp-webapp/issues/356
Stacktrace:
$ gulp bootstrap
[05:31:08] Failed to load external module babel-core/register
[05:31:08] Failed to load external module babel/register
/home/vagrant/IronLock/electron-ui/gulpfile.babel.js:1
(function (exports, require, module, __filename, __dirname) { let gulp = require('gulp');
^^^
SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:413:25)
at Object.Module._extensions..js (module.js:452:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Liftoff.handleArguments (/home/vagrant/.nvm/versions/node/v4.1.1/lib/node_modules/gulp/bin/gulp.js:116:3)
at Liftoff.<anonymous> (/home/vagrant/.nvm/versions/node/v4.1.1/lib/node_modules/gulp/node_modules/liftoff/index.js:192:16)
at module.exports (/home/vagrant/.nvm/versions/node/v4.1.1/lib/node_modules/gulp/node_modules/liftoff/node_modules/flagged-respawn/index.js:17:3)
System information:
$ node -e 'console.log(process.platform, process.versions)'
linux { http_parser: '2.5.0',
node: '4.1.1',
v8: '4.5.103.33',
uv: '1.7.4',
zlib: '1.2.8',
ares: '1.10.1-DEV',
modules: '46',
openssl: '1.0.2d' }
$ npm -v
2.14.4
$ babel --version
5.8.23 (babel-core 5.8.25)
$ gulp -v
[05:34:38] Failed to load external module babel-core/register
[05:34:38] Failed to load external module babel/register
[05:34:38] CLI version 3.9.0
[05:34:38] Local version 3.9.0
What is interesting, is that you get Failed to load ... babel ...
also when you try to print your gulps version. I suppose this is something that you have to take care on your local machine. Easiest way would be to write a trivial gulp.babel.js
in a separate directory and check if gulp can handle that.
P.S.
Have you already executed npm install
?
Yes I have, and apart from warnings about the wrong version of a dependency nothing special came up. I'll update with the trivial test result when I get the chance.
Hey, how do I actually get gulpfile.js and the lib folder run through babel so that I can start running gulp talks? Sorry if I have misunderstood this from the readme.
I have cloned the repository and
npm start
fails because there is nogulpfile.js
still only agulpfile.babel.js
. What is the bootstrap script?This project looks awesome by the way.