Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

JavaScript Gulp Basics Compile Sass with Gulp Add Source Maps to your SaSS

Richard Lake
Richard Lake
20,462 Points

(piping) .write method is not defined

The line .pipe(write('./')) fails in my fulp file it says that the write method is not defined. I am not sure what to do about this one. :(

Using gulpfile C:\sites\html\local.fuel.co.uk\fuel\application\gulpfile.js [16:39:10] Starting 'build'... [16:39:10] 'build' errored after 13 ms [16:39:10] ReferenceError: write is not defined at Gulp.<anonymous> (C:\sites\html\local.fuel.co.uk\fuel\application\gulpfile.js:14:15) at module.exports (C:\sites\html\local.fuel.co.uk\fuel\application\node_modules\orchestrator\lib\runTask.js:34:7) at Gulp.Orchestrator._runTask (C:\sites\html\local.fuel.co.uk\fuel\application\node_modules\orchestrator\index.js:273:3) at Gulp.Orchestrator._runStep (C:\sites\html\local.fuel.co.uk\fuel\application\node_modules\orchestrator\index.js:214:10) at Gulp.Orchestrator.start (C:\sites\html\local.fuel.co.uk\fuel\application\node_modules\orchestrator\index.js:134:8) at C:\Users\rl2\AppData\Roaming\npm\node_modules\gulp-cli\lib\versioned^3.7.0\index.js:54:20 at _combinedTickCallback (internal/process/next_tick.js:73:7) at process._tickCallback (internal/process/next_tick.js:104:9) at Module.runMain (module.js:606:11) at run (bootstrap_node.js:389:7)

2 Answers

Richard Lake
Richard Lake
20,462 Points

Actually solved it by watching the next video... correct syntax is .pipe(maps.write('./')).

It's actually incorrect on the video itself - despite showing it working :S

Now on to the next error message ^.^

Josef Aidt
Josef Aidt
7,722 Points

He goes back and fixes it during the video after he gets the same error.

Tuan Phan
Tuan Phan
10,825 Points

Use

.pipe(maps.write('./')

Instead of

.pipe(write('./')

You can watch that in the next video....