is gulpfile.coffee supported out of the box with gulp >= 3.7.0?
See original GitHub issueAfter reading #103, #123, and #452, I got impression that gulpfile.coffee
is supported out of the box with gulp >= 3.7.0. Is that true?
For me, it fails on win8.0 x64 with node 0.10.32 and local+global gulp 3.8.8.
Steps to reproduce:
mkdir test && cd test
echo require 'gulp' > gulpfile.coffee
on windows, orecho "require 'gulp'" > gulpfile.coffee
on linux/macnpm install -g gulp
npm install gulp coffee-script
gulp
Expected result is gulp complaining about missing default task. Actual result:
D:\test\gulpfile.coffee:1
tion (exports, require, module, __filename, __dirname) { gulp = require 'gulp'
^^^^^^
SyntaxError: Unexpected string
at Module._compile (module.js:439:25)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Liftoff.handleArguments (C:\Users\x\AppData\Roaming\npm\node_modules\gulp\bin\gulp.js:108:3)
at Liftoff.launch (C:\Users\x\AppData\Roaming\npm\node_modules\gulp\node_modules\liftoff\index.js:143:6)
at Object.<anonymous> (C:\Users\x\AppData\Roaming\npm\node_modules\gulp\bin\gulp.js:59:5)
at Module._compile (module.js:456:26)
Both the old workarounds do work:
- either
gulp --require coffee-script/register
- or
echo require('coffee-script/register'); require('./gulpfile.coffee'); > gulpfile.js
beforegulp
Issue Analytics
- State:
- Created 9 years ago
- Comments:11 (2 by maintainers)
Top Results From Across the Web
Quick Start | gulp.js
Quick Start# · Check for node, npm, and npx# · Install the gulp command line utility# · Create a project directory and navigate...
Read more >10 things to know about Gulp - Adam Lynch
Gulp supports CoffeeScript since version 3.7. Once you npm install --save-dev coffee-script in the same directory as your gulpfile, you can have ...
Read more >Homestead gulp/npm not working - Laracasts
<anonymous> (/home/vagrant/_test_test_/laravel/gulpfile.js:1:76) at Module. ... been reintegrated into npm and is now out of date with respect to npm npm ...
Read more >How to fix "ReferenceError: primordials is not defined" in Node.js
Gulp 3.* doesn't work on Node.js 12.* or above. You have to downgrade Node.js, or upgrade Gulp.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is expected. Gulp does not require coffee-script to function properly. If we bundle coffee-script we have to release a new version of Gulp when coffee-script changes. Installing locally is the best/recommended practice.
I had this problem today using
gulp@3.9.1
and I had to installcoffee-script
locally in order to make it work.