Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angularjs/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Angularjs Angular 1 cli在创建新应用程序时出现多个错误_Angularjs - Fatal编程技术网

Angularjs Angular 1 cli在创建新应用程序时出现多个错误

Angularjs Angular 1 cli在创建新应用程序时出现多个错误,angularjs,Angularjs,我最近刚刚安装了angular 1 cli并将其卸载,今天再次安装时,在“ng new”执行过程中出现以下错误,我甚至无法构建/服务它,请在下面的代码中查看构建/服务错误 > ng-core-addons@0.0.9 postinstall C:\Users\pauld\Desktop\poop\node_modules\ng-core-addons > node ./node_modules/fs-concatenate -i content -o snippets.js

我最近刚刚安装了angular 1 cli并将其卸载,今天再次安装时,在“ng new”执行过程中出现以下错误,我甚至无法构建/服务它,请在下面的代码中查看构建/服务错误

> ng-core-addons@0.0.9 postinstall C:\Users\pauld\Desktop\poop\node_modules\ng-core-addons
    > node ./node_modules/fs-concatenate -i content -o snippets.js

    module.js:472
        throw err;
        ^

    Error: Cannot find module 'C:\Users\pauld\Desktop\poop\node_modules\ng-core-addons\node_modules\fs-concatenate'
        at Function.Module._resolveFilename (module.js:470:15)
        at Function.Module._load (module.js:418:25)
        at Module.runMain (module.js:605:10)
        at run (bootstrap_node.js:420:7)
        at startup (bootstrap_node.js:139:9)
        at bootstrap_node.js:535:3


npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.0.17: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN karma-jasmine@0.3.8 requires a peer of jasmine-core@* but none was installed.
npm WARN karma-mocha-reporter@0.3.2 requires a peer of karma@>=0.9 but none was installed.
npm WARN angularApp@0.0.0 No description
npm WARN angularApp@0.0.0 No repository field.
npm WARN angularApp@0.0.0 No license field.
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v7.4.0
npm ERR! npm  v4.0.5
npm ERR! code ELIFECYCLE

npm ERR! ng-core-addons@0.0.9 postinstall: `node ./node_modules/fs-concatenate -i content -o snippets.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ng-core-addons@0.0.9 postinstall script 'node ./node_modules/fs-concatenate -i content -o snippets.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the ng-core-addons package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node ./node_modules/fs-concatenate -i content -o snippets.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs ng-core-addons
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls ng-core-addons
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\pauld\Desktop\poop\npm-debug.log
当我尝试服务/构建时,我得到了以下信息,我尝试在全球范围内安装karma软件包,但也没有成功。 我甚至试着安装茉莉花什么的,都没用

Error: Cannot find module 'karma'
    at Function.Module._resolveFilename (module.js:470:15)
    at Function.Module._load (module.js:418:25)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (C:\Users\pauld\Desktop\poop\node_modules\ngcli-task-runner\index.js:3:13)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
[8:09:58 PM UTC] ERR! module.js:472
    throw err;
    ^

Error: Cannot find module 'karma'
    at Function.Module._resolveFilename (module.js:470:15)
    at Function.Module._load (module.js:418:25)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (C:\Users\pauld\Desktop\poop\node_modules\ngcli-task-runner\index.js:3:13)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
 ×
错误:找不到模块'karma'
在Function.Module.\u解析文件名(Module.js:470:15)
在Function.Module.\u加载(Module.js:418:25)
at Module.require(Module.js:498:17)
根据需要(内部/module.js:20:19)
反对。(C:\Users\pauld\Desktop\poop\node\u modules\ngcli task runner\index.js:3:13)
在模块处编译(模块js:571:32)
在Object.Module.\u extensions..js(Module.js:580:10)
在Module.load(Module.js:488:32)
在tryModuleLoad时(module.js:447:12)
在Function.Module.\u加载(Module.js:439:3)
[UTC下午8:09:58]呃!module.js:472
犯错误;
^
错误:找不到模块“karma”
在Function.Module.\u解析文件名(Module.js:470:15)
在Function.Module.\u加载(Module.js:418:25)
at Module.require(Module.js:498:17)
根据需要(内部/module.js:20:19)
反对。(C:\Users\pauld\Desktop\poop\node\u modules\ngcli task runner\index.js:3:13)
在模块处编译(模块js:571:32)
在Object.Module.\u extensions..js(Module.js:580:10)
在Module.load(Module.js:488:32)
在tryModuleLoad时(module.js:447:12)
在Function.Module.\u加载(Module.js:439:3)
×

将Angular Cli升级至最新版本。使用以下命令更新系统中全局安装的angular cli软件包:

    npm uninstall -g angular-cli
    npm cache clean or npm cache verify (if npm > 5)
    npm install -g @angular/cli@latest

升级后它将被修复。

将Angular Cli升级到最新版本。使用以下命令更新系统中全局安装的angular cli软件包:

    npm uninstall -g angular-cli
    npm cache clean or npm cache verify (if npm > 5)
    npm install -g @angular/cli@latest

升级后它将被修复。

您解决了吗?我必须在本地安装karma、jasmine core、fs concatenate和ng core插件(按此顺序)。构建和服务似乎工作得很好(请考虑这一点),但在测试中,它遇到了一些问题,与karma.conf.js的相对路径有关。删除所有全局依赖项/本地,重新安装nodejs。我也有同样的问题。你解决了吗?我必须在本地安装karma、jasmine core、fs concatenate和ng core插件(按此顺序)。构建和服务似乎工作得很好(请考虑这一点),但在测试中,它遇到了一些问题,与karma.conf.js的相对路径有关。删除所有全局依赖项/本地,重新安装nodejs。我也有同样的问题。