我正在尝试通过运行yo gulp-webapp
生成一个generator-gulp-webapp的应用,但是当我这样做时,我收到以下错误:
Deans-Air:deangibson deang$ sudo yo gulp-webapp
module.js:339
throw err;
^
Error: Cannot find module 'escape-string-regexp'
at Function.Module._resolveFilename (module.js:337:15)
at Function.Module._load (module.js:287:25)
at Module.require (module.js:366:17)
at require (module.js:385:17)
at Object.<anonymous> (/usr/local/lib/node_modules/yo/node_modules/chalk/index.js:2:26)
at Module._compile (module.js:435:26)
at Object.Module._extensions..js (module.js:442:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:311:12)
at Module.require (module.js:366:17)
Deans-Air:deangibson deang$
答案 0 :(得分:1)
今天遇到同样的问题。我在堆栈顶部发现了一个错误cannot run in wd %s %s
。重新运行带有$ sudo npm install -g mean-cli
标志的--unsafe-perm
命令为我修复了它。
节点:v0.12.2
NPM:3.5.0