Sta*_*tec 1 javascript node.js npm gruntjs yeoman
我的Grunt装置发生了一些事情,我不知道它是什么.我正在使用Yeoman来构建我的应用程序,但今天我开始遇到很多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.
Run Code Online (Sandbox Code Playgroud)
我已经更新了NPM,我试图更新Grunt,我已经尝试安装Grunt找不到的所有这些软件包.有没有办法核对并重新编辑Grunt并为这个项目安装一个全新的副本?
小智 8
您可能已在计算机上部分安装了部分安装的npm软件包.
试试跑步 npm cache clean
然后删除安装的项目包:
rm -rf node_modules
然后尝试再跑npm install一次.
| 归档时间: |
|
| 查看次数: |
3815 次 |
| 最近记录: |