初始化npm install时,npm找不到npm-debug.log文件(Angular 2-CLI)

时间:2018-02-13 05:29:52

标签: angular npm npm-debug

为我的新Angular 2项目安装npm包时,我遇到了问题。

npm ERR! Please include the following file with any support request:
npm ERR!     D:\CR_Automation_UI_POC\POC\npm-debug.log

所以,问题是npm无法找到npm-debug.log文件,但它已经存在于文件夹中。如何解决这个问题?

Visual Studio Code的控制台窗口的屏幕截图如下所示 this

这是我的package.json文件

{
  "name": "poc",
  "version": "0.0.0",
  "license": "MIT",
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build --prod",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e"
  },
  "private": true,
  "dependencies": {
    "@angular/animations": "^5.2.0",
    "@angular/common": "^5.2.0",
    "@angular/compiler": "^5.2.0",
    "@angular/core": "^5.2.0",
    "@angular/forms": "^5.2.0",
    "@angular/http": "^5.2.0",
    "@angular/platform-browser": "^5.2.0",
    "@angular/platform-browser-dynamic": "^5.2.0",
    "@angular/router": "^5.2.0",
    "core-js": "^2.4.1",
    "rxjs": "^5.5.6",
    "zone.js": "^0.8.19"
  },
  "devDependencies": {
    "@angular/cli": "1.6.8",
    "@angular/compiler-cli": "^5.2.0",
    "@angular/language-service": "^5.2.0",
    "@types/jasmine": "~2.8.3",
    "@types/jasminewd2": "~2.0.2",
    "@types/node": "~6.0.60",
    "codelyzer": "^4.0.1",
    "jasmine-core": "~2.8.0",
    "jasmine-spec-reporter": "~4.2.1",
    "karma": "~2.0.0",
    "karma-chrome-launcher": "~2.2.0",
    "karma-coverage-istanbul-reporter": "^1.2.1",
    "karma-jasmine": "~1.1.0",
    "karma-jasmine-html-reporter": "^0.2.2",
    "protractor": "~5.1.2",
    "ts-node": "~4.1.0",
    "tslint": "~5.9.1",
    "typescript": "~2.5.3"
  }
}

1 个答案:

答案 0 :(得分:0)

我不认为CLI抛出的错误是由于缺少debug.log文件引起的。

如果您选择向您尝试安装的npm软件包的作者提交任何支持请求,它会告诉您包含它,这是 <script type="text/javascript"> $(document).ready(function() { $('form').parsley(); }); </script> ,所以我猜测错误可能就在那里。你能包含.log文件吗?