load-grunt-tasks出錯
錯誤提示:
Loading "Gruntfile.js" tasks...ERROR
>> Error: Cannot find module 'load-grunt-tasks'
Warning: Task "coyp" not found. Use --force to continue.
Aborted due to warnings.
將Gruntfile.js中
require('load-grunt-tasks')(grunt);
改為
grunt.loadNpmTasks('grunt-contrib-copy');
后運行grunt copy,運行成功沒有問題
直接在yeoman生成的文件中運行grunt的時候也沒有問題(含有load-grunt-tasks語句)
但是我自己定義的項目就有這個問題,過程和老師您的視頻中應該是相同的
先后在項目路徑下安裝
npm install grunt --save-dev;?npm install grunt-contrib-copy --save-dev
嘗試了全局重新安裝grunt也沒能解決
請問老師這種情況如何解決
2015-02-02
因為你沒有在當前項目目錄安裝load-grunt-tasks , npm install load-grunt-tasks .
2015-11-18
解決了的說下怎么弄
2015-07-11
我的也是依舊出錯...
2015-03-25
還是出錯