【问题标题】:Deploying webapp using grunt on heroku not working在heroku上使用grunt部署webapp不起作用
【发布时间】:2014-04-22 13:31:03
【问题描述】:

我已将 grunt registerTask 'heroku' 任务添加到 Gruntfile.js 文件中。但是在做 git commit 和 git push heroku master 时,最后我得到了这个错误。请在这里帮助我。

-----> 找到 Gruntfile,运行 grunt heroku:production task 加载“Gruntfile.js”任务...错误 错误:找不到模块“load-grunt-tasks” 警告:找不到任务“heroku:production”。使用 --force 继续。

grunt.registerTask('heroku',[
        'clean:dist',
        'useminPrepare',
        'concurrent:dist',
        'compass:dist', 
        'autoprefixer', 
        'concat',
        'imagemin',
        'cssmin',
        'uglify',
        'modernizr',
        'usemin',
        'htmlmin'
    ]);

【问题讨论】:

    标签: heroku gruntjs yeoman


    【解决方案1】:

    我昨天遇到了同样的问题。

    您需要将 load-grunt-tasks 添加到 package.json 中的依赖项,而不是您的 devDependencies。此外,请确保您的任务名为 heroku:production,因为这是错误明确指出的内容。

    【讨论】:

      猜你喜欢
      • 2021-09-04
      • 2017-01-12
      • 2023-01-27
      • 2019-01-23
      • 2023-03-16
      • 2020-10-30
      • 2016-02-22
      • 2016-09-22
      • 2015-05-29
      相关资源
      最近更新 更多