【问题标题】:Error while compiling with gulp使用 gulp 编译时出错
【发布时间】:2017-11-22 12:38:31
【问题描述】:

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

操作系统 = Windows 10

节点-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)

【问题讨论】:

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


    【解决方案1】:

    我通过安装这样的缺失模块来修复它

    npm install cloneable-readable
    npm install clone-buffer
    

    就我而言,是上面那两个

    【讨论】:

    • 它似乎也对我有用。您是否找到了 gulp 未安装该模块的原因并可能为他们打开了一个问题?
    • @Ben2307 该错误出现已经有一段时间了,但我认为它没有安装,因为它被定义为可选我会检查然后如果还没有打开我会打开一个问题。
    猜你喜欢
    • 1970-01-01
    • 2022-06-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-10-27
    • 2016-05-28
    相关资源
    最近更新 更多