【问题标题】:yeoman generated app crashes on running grunt commandyeoman 生成的应用程序在运行 grunt 命令时崩溃
【发布时间】:2018-01-26 09:15:30
【问题描述】:

在使用 Yeoman 生成器生成应用程序后运行 grunt 命令时出现以下错误:

Loading "grunt-karma.js" tasks...ERROR
>> TypeError: Cannot read property 'prototype' of undefined
>> Local Npm module "grunt-node-inspector" not found. Is it installed?

Running "env:dev" (env) task

Running "sass:dist" (sass) task

Running "less:dist" (less) task

Running "jshint:all" (jshint) task
>> 86 files lint free.

Running "csslint:all" (csslint) task
>> 2 files lint free.

Running "mkdir:upload" task

Running "copy:localConfig" (copy) task
Copied 1 file

Running "concurrent:default" (concurrent) task
Loading "grunt-karma.js" tasks...ERROR
>> TypeError: Cannot read property 'prototype' of undefined
Loading "grunt-karma.js" tasks...ERROR
>> TypeError: Cannot read property 'prototype' of undefined
>> Local Npm module "grunt-node-inspector" not found. Is it installed?
>> Local Npm module "grunt-node-inspector" not found. Is it installed?

Running "nodemon:dev" (nodemon) task

Running "watch" task
Waiting...
[nodemon] 1.11.0
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: server.js config/**/*.js                 
modules/*/server/**/*.js
[nodemon] starting `node --debug server.js`
(node:16253) [DEP0062] DeprecationWarning: `node --debug` and `node --debug-brk` are invalid. Please use `node --inspect` or `node --inspect-brk` instead.
[nodemon] app crashed - waiting for file changes before starting...

我发现了一个类似的问题 (Yeoman grunt could not connect to MongoDB),但我无法在那里找到我的问题的解决方案。

【问题讨论】:

    标签: npm gruntjs meanjs yeoman-generator yo


    【解决方案1】:

    这是 MEAN.js 的旧版本吗?我相信grunt 已被gulp 取代,而且有关node-inspector 的问题也已由pull request 解决。

    您应该检查您正在使用的版本并进行必要的更改。

    【讨论】:

      猜你喜欢
      • 2017-06-21
      • 1970-01-01
      • 1970-01-01
      • 2011-12-06
      • 2015-10-29
      • 2012-05-08
      • 2020-02-01
      • 1970-01-01
      相关资源
      最近更新 更多