我的Grunt安装发生了一些事情,我不知道它是什么。我正在使用Yeoman来支撑我的应用程序,但是今天我开始收到很多Grunt错误。举例来说,我现在得到如下当我运行Grunt Test
:如何在yeoman项目中重新安装Grunt?
Loading "autoprefixer.js" tasks...ERROR
>> Error: Cannot find module 'base64-js'
Loading "connect.js" tasks...ERROR
>> Error: Cannot find module 'cookie-signature'
Loading "imagemin.js" tasks...ERROR
>> Error: Cannot find module './lib/js-yaml.js'
Loading "jshint.js" tasks...ERROR
>> Error: Cannot find module 'jshint'
Loading "uglify.js" tasks...ERROR
>> Error: Cannot find module './source-map/source-map-generator'
Loading "cdnify.js" tasks...ERROR
>> SyntaxError: /Users/Documents/Git/client/node_modules/grunt-google-cdn/node_modules/google-cdn/node_modules/cdnjs-cdn-data/external/cdnjs.json: Unexpected end of input
Loading "grunt-karma.js" tasks...ERROR
>> SyntaxError: /Users/Documents/Git/client/node_modules/karma/node_modules/socket.io/node_modules/engine.io/lib/server.js:390
>> });
>>
>> Unexpected end of input
Loading "ngmin.js" tasks...ERROR
>> Error: Cannot find module 'estraverse'
Loading "svgmin.js" tasks...ERROR
>> SyntaxError: /Users/Documents/Git/client/node_modules/grunt-svgmin/node_modules/svgo/node_modules/js-yaml/lib/js-yaml/loader.js:950
>> });
>>^
>> Unexpected token)
Loading "usemin.js" tasks...ERROR
>> SyntaxError: /Users/Documents/Git/client/node_modules/grunt-usemin/node_modules/lodash/dist/lodash.js:5520
>> });
>>^
>> Unexpected token }
Loading "css_sprite.js" tasks...ERROR
>> Error: Cannot find module 'async'
Warning: Task "autoprefixer" not found. Use --force to continue.
我已经更新NPM,我试图更新咕噜,我试图安装所有那些兽人无法找到包。有没有一种方法来核实和重新安装Grunt并为这个项目安装一个全新的副本?
起初,我以为我会做,但所有的“失踪”包的实际安装。另外,我试着运行'npm install'来重新安装它们,但没有任何改变。 – Startec 2015-03-02 06:14:38
你的第一个错误是无法找到模块'base64-js' ...从那里开始... – deostroll 2015-03-02 06:25:18