我的Grunt装置出了点问题,我不知道它是什么。我正在使用约曼支架我的应用程序,但今天我开始收到许多Grunt错误。例如,当我运行Grunt Test时,我现在得到以下信息
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,我尝试安装了Grunt无法找到的所有软件包。是否有一种方法可以对Grunt进行核爆并重新安装该项目的全新副本?
发布于 2015-03-02 05:55:57
只需跟随错误messages...for例如你的说..。
警告:找不到任务“自动修复器”。继续使用武力。
试着安装自动固定装置.
npm install grunt-autoprefixer --save然后再运行grunt test ..。
你会得到其他的错误,messages...find,也就是missing...install,通过npm。有时你可能得在谷歌上搜索正确的包名..。
发布于 2015-03-02 08:54:27
您可能已经部分安装了缓存在计算机上的npm包。
尝试运行npm cache clean
然后删除安装的项目包:rm -rf node_modules
然后再运行npm install一次。
https://stackoverflow.com/questions/28803373
复制相似问题