Cannot find module 'gulp-util'

扶醉桌前 提交于 2019-12-24 06:59:14

问题


I have some trouble with gulp. I use laravel/elixir which has gulp as its dependency. I did the steps like here Can't get Gulp to run: cannot find module 'gulp-util' but still no success. Actually the gulp-util files are inside the node_modules folder...

Anyway I'm using Xubuntu 17.04 64bit if it counts.


回答1:


I had the same problem, and tried almost everything. But then I realized that the error does not point to the local gulp in the respective project but to the global one (/usr/lib/nodejs/gulp/...).

What solved the problem for me was to update that respective gulp:

sudo npm install -g gulp

I am not sure if it is in general correct that the global gulp is used or if the one of the project should be used instead. But at least for now I was able to solve the problem with that.

Hope it helps.



来源:https://stackoverflow.com/questions/44396140/cannot-find-module-gulp-util

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!