我的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