我需要你帮助我从git下载这个着名的角度JS项目。 https://github.com/thaiat/famous-flickr
当我运行gulp浏览器同步时,我收到此ENAMETOOLONG错误,我不知道如何修复它。
aj$ gulp browsersync
[23:45:56] Using gulpfile ~/famous-flickr/gulpfile.js
[23:45:56] Starting 'browserify'...
[23:45:56] Finished 'browserify' after 23 ms
[23:45:56] Starting 'fonts'...
[23:45:56] Finished 'fonts' after 3.37 ms
[23:45:56] Starting 'style'...
[23:45:56] Starting 'style:watch'...
[23:45:56] Finished 'style:watch' after 7.39 ms
fs.js:438
return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
^
Error: ENAMETOOLONG, name too long '/Users/famous-`flickr/client/styles/data:application/json;base64,
at Object.fs.openSync (fs.js:438:18)
at Object.fs.readFileSync (fs.js:289:15)
at fromSource (/Users/DhanLalRaj/famous-flickr/node_modules/gulp-minify-css/node_modules/clean-css/lib/utils/input-source-map-tracker.js:67:31)
at InputSourceMapStore.track (/Users/DhanLalRaj/famous-flickr/node_modules/gulp-minify-css/node_modules/clean-css/lib/utils/input-source-map-tracker.js:137:5)
at Object.whenDone (/Users/DhanLalRaj/famous-flickr/node_modules/gulp-minify-css/node_modules/clean-css/lib/clean.js:96:44)
at processNext (/Users/DhanLalRaj/famous-flickr/node_modules/gulp-minify-css/node_modules/clean-css/lib/imports/inliner.js:105:13)
at importFrom (/Users/DhanLalRaj/famous-flickr/node_modules/gulp-minify-css/node_modules/clean-css/lib/imports/inliner.js:79:10)
at ImportInliner.process (/Users/DhanLalRaj/famous-flickr/node_modules/gulp-minify-css/node_modules/clean-css/lib/imports/inliner.js:36:10)
at /Users/DhanLalRaj/famous-flickr/node_modules/gulp-minify-css/node_modules/clean-css/lib/clean.js:71:41
at process._tickDomainCallback (node.js:463:13)
答案 0 :(得分:0)
在缩小过程中,这似乎是一个可以提供地图文件的问题。请参阅https://github.com/FlagshipWP/compass/issues/29该项目遇到类似问题的地方。
对我有用的解决方案就是简单地抑制sass创建地图文件。如果你有一个gulp项目,只需设置sass的配置参数:
<...>
.pipe(sass, mainSass, {
sourcemap:false,
loadPath: ['resources/bower_components']
})
<...>
如果你从命令行运行sass,它将是:
sass blahblahblah.css --sourcemap=none