node.js - 使用gulp编译时出错

标签 node.js npm gulp gulp-sass laravel-elixir

我正在使用 Laravel ElixrLaravel mix ,如下所示并编译 scss 文件

OS = Windows 10

node -v = v6.11.0

npm --v = 5.0.3

+-- laravel-elixir@6.0.0-15
| `-- gulp-sass@2.3.2
|   `-- node-sass@3.13.1
`-- laravel-mix@0.11.4
  `-- node-sass@4.5.2

错误是找不到模块“可克隆可读”,如下所示

> [05:51:53] Using gulpfile D:\www\fevrok.com\gulpfile.js 
> [05:51:53] Starting 'all'...
> [05:51:53] Starting 'sass'...
> [05:51:54] 'sass' errored after 713 ms
> [05:51:54] Error: Cannot find module 'cloneable-readable'
>     at Function.Module._resolveFilename (module.js:469:15)
>     at Function.Module._load (module.js:417:25)
>     at Module.require (module.js:497:17)
>     at require (internal/module.js:20:19)
>     at Object.<anonymous> (D:\www\fevrok.com\node_modules\gulp-concat\node_modules\vinyl\index.js:8:17)
>     at Module._compile (module.js:570:32)
>     at Object.Module._extensions..js (module.js:579:10)
>     at Module.load (module.js:487:32)
>     at tryModuleLoad (module.js:446:12)
>     at Function.Module._load (module.js:438:3)
> [05:51:54] 'all' errored after 745 ms
> [05:51:54] Error in plugin 'run-sequence(sass)'
> Message:
>     Cannot find module 'cloneable-readable'
> Details:
>     code: MODULE_NOT_FOUND
> Stack:
> Error: Cannot find module 'cloneable-readable'
>     at Function.Module._resolveFilename (module.js:469:15)
>     at Function.Module._load (module.js:417:25)
>     at Module.require (module.js:497:17)
>     at require (internal/module.js:20:19)
>     at Object.<anonymous> (D:\www\fevrok.com\node_modules\gulp-concat\node_modules\vinyl\index.js:8:17)
>     at Module._compile (module.js:570:32)
>     at Object.Module._extensions..js (module.js:579:10)
>     at Module.load (module.js:487:32)
>     at tryModuleLoad (module.js:446:12)
>     at Function.Module._load (module.js:438:3)

最佳答案

我通过安装丢失的模块来修复它

npm install cloneable-readable
npm install clone-buffer

就我而言,就是上面的那两个

关于node.js - 使用gulp编译时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44645079/

相关文章:

javascript - 意外的标识符 - JS Node

node.js - npm start 以 - fatal error : MarkCompactCollector: young object promotion failed Allocation failed - JavaScript heap out of memory 结束

javascript - 减少对象数组: limit similar fields based on value from another field

javascript - 包含其他 gulp 文件的 Gulpfile

node.js - 图片库网站最佳实践

node.js - 无论如何,快速文件上传都会产生 "Unexpected end of form"

javascript - Gulp 插件订单

javascript - 如何在共享主机上安装没有 npm 的 gulp?

javascript - node.js http.get() 抛出 : events. js:72 ECONNREFUSED

javascript - 在 Meteor 1.3 中导入通过 npm 安装的外部 Javascript 库