yeoman生成的应用程序崩溃运行grunt命令

时间:2017-08-17 19:49:49

标签: npm gruntjs meanjs yeoman-generator yo

在使用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),但我无法在那里找到问题的解决方案。

1 个答案:

答案 0 :(得分:0)

这是MEAN.js的旧版本吗?我相信<?php include "dbconf2.php"; $sqlimage=" SELECT F.Grafik, F.knr, F.brstatus1, F.untertitel1, F.anzeigeweb1 FROM FOTO F WHERE F.knr LIKE 'FHTG20900%' ;"; $stmtimage = sqlsrv_query($connVHS, $sqlimage); while ($result2=sqlsrv_fetch_array($stmtimage)) { echo "titel: ".$result2['untertitel1']."<br>"; echo "knr: ".$result2['knr']."<br>"; echo "status: ".$result2['brstatus1']."<br>"; echo "web: ".$result2['anzeigeweb1']."<br>"; echo '<img src="data:image/jpeg;base64,'.base64_encode( $result2['Grafik']).'" style="max-height: 500px; max-width: 400px;"/>'."<br>"; echo "<br>"; } ?> 已被$image = imagecreatefromstring(base64_encode( $result2['Grafik'])); $image = imagescale($image, 100, 100); ob_start(); imagejpeg($image); $contents = ob_get_contents(); ob_end_clean(); echo "<img src='data:image/jpeg;base64,".base64_encode($contents)."' />"; imagedestroy($image); 取代,grunt也解决了gulp的问题。

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