无法运行“grunt serve”
获取以下附加错误,请执行必要的
C:\wamp\www\ui\app>npm install
npm ERR! install Couldn't read dependencies
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files (x86)\\nodejs\\node.exe" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v4.3.1
npm ERR! npm v2.14.12
npm ERR! path C:\wamp\www\ui\app\package.json
npm ERR! code ENOPACKAGEJSON
npm ERR! errno -4058
npm ERR! syscall open
npm ERR! package.json ENOENT: no such file or directory, open 'C:\wamp\www\ui\app\package.json'
npm ERR! package.json This is most likely not a problem with npm itself.
npm ERR! package.json npm can't find a package.json file in your current directory.
npm ERR! Please include the following file with any support request:
npm ERR! C:\wamp\www\ui\app\npm-debug.log
C:\wamp\www\ui\app>grunt serve
Loading "Gruntfile.js" tasks...ERROR
>> Error: Cannot find module 'load-grunt-tasks'
Warning: Task "serve" not found. Use --force to continue.
Aborted due to warnings.
答案 0 :(得分:2)
在npm install
之前运行grunt serve
。
如果这没有帮助,那么您需要npm install --save-dev load-grunt-tasks
答案 1 :(得分:1)
你可以试试这个:
npm install load-grunt-tasks
通常当你有:
Error Cannot find module 'module_name'
然后npm install module_name
安装模块!