Sunday, May 19, 2024
 Popular · Latest · Hot · Upcoming
95
rated 0 times [  99] [ 4]  / answers: 1 / hits: 73160  / 8 Years ago, tue, august 9, 2016, 12:00:00

The project I worked on was built with gulp.



Recently I updated the node version to v6.3.1. Then something came wrong.



A task named 'html' throws an error. Here is the part of error code of it.



bogon:toClient work$ gulp html
(node:2519) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.

[10:26:10] Using gulpfile ~/Project/TIME_Cancer_Treatment_Centers_of_America(CTCA)/toClient/gulpfile.js
[10:26:10] Starting 'html'...
(node:2519) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.

events.js:160
throw er; // Unhandled 'error' event
^
Error: CSS parse error scripts/vendor.js: Unexpected input
1 |!function(t,e){object==typeof module&&object==typeof module.exports?module.exports=t.document?e(t,!0):function(t){if(!t.document)throw new Error(jQuery requires a window with a document);return e(t)}:e(t)}(undefined!=typeof window?window:this,function(t,e){function i(t){var e=lengthin t&&t.length,i=J.type(t);returnfunction!==i&&!J.isWindow(t)&&(!(1!==t.nodeType||!e)||(array===i||0===e||


And the code of task 'html':



var $ = require('gulp-load-plugins')();

gulp.task('html', function() {
var assets = $.useref.assets({searchPath: ['.tmp']});

return gulp.src('app/*.html')
.pipe(assets)
.pipe($.if('*.js', $.uglify()))
.pipe($.if('*.css', $.csso()))
.pipe(assets.restore())
.pipe($.useref())
.pipe($.if('*.html', $.minifyHtml({conditionals: true, loose: true})))
.pipe(gulp.dest('dist'));
});


I googled a lot but I haven't found a proper answer suitable for me.


More From » node.js

 Answers
45

removing the node_modules folder, clearing npm cached files, and doing a fresh install, resolves this issue.



rm -rf node_modules && npm cache clean --force && npm install


source: https://github.com/ember-cli/ember-cli/issues/3087#issuecomment-71327402


[#61095] Saturday, August 6, 2016, 8 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
eanskylerg

Total Points: 524
Total Questions: 107
Total Answers: 100

Location: Colombia
Member since Mon, May 2, 2022
2 Years ago
;