“ npm ERR!解析附近时JSON输入意外结束。缓存清理不起作用

时间:2018-12-09 02:47:02

标签: node.js npm

自2天以来,我一直在尝试“ npm安装”。论坛上几乎所有其他类似问题的答案都表明,“ npm cahce clean -f”解决了问题。

但是,对我而言,这两种情况都不起作用-1.用于在全球范围内安装新软件包,2.用于为现有项目安装本地软件包

我尝试同时使用两个备用注册表(https://registry.npmjs.org/http://registry.npmjs.org/)。而且我也没有任何代理人。

我正在使用- Windows 7旗舰版, 节点版本:10.14.1, NPM版本:6.4.1

我也尝试过降级以使用Node8.x。但是,这也不行。

我的项目中的Package.json

 {
      "name": "my-ng-app",
      "version": "0.0.0",
      "main": "main.js",
      "scripts": {
        "ng": "ng",
        "start": "ng serve",
        "build": "ng build",
        "test": "ng test",
        "lint": "ng lint",
        "e2e": "ng e2e",
        "electron": "ng build && electron .",
        "electron-aot": "ng build --prod && electron .",
        "electron-packager-windows": "electron-packager . MyNgElectron --platform=win32"
      },
      "private": true,
      "dependencies": {
        "@angular/animations": "~7.0.0",
        "@angular/common": "~7.0.0",
        "@angular/compiler": "~7.0.0",
        "@angular/core": "~7.0.0",
        "@angular/forms": "~7.0.0",
        "@angular/http": "~7.0.0",
        "@angular/platform-browser": "~7.0.0",
        "@angular/platform-browser-dynamic": "~7.0.0",
        "@angular/router": "~7.0.0",
        "@ng-bootstrap/ng-bootstrap": "^4.0.0",
        "core-js": "^2.5.4",
        "rxjs": "~6.3.3",
        "sequelize": "^4.41.0",
        "sqlite3": "^4.0.3",
        "zone.js": "~0.8.26"
      },
      "devDependencies": {
        "@angular-devkit/build-angular": "~0.10.0",
        "@angular/cli": "~7.0.2",
        "@angular/compiler-cli": "~7.0.0",
        "@angular/language-service": "~7.0.0",
        "@types/jasmine": "~2.8.8",
        "@types/jasminewd2": "~2.0.3",
        "@types/node": "~8.9.4",
        "codelyzer": "~4.5.0",
        "electron": "^3.0.5",
        "electron-packager": "^12.2.0",
        "jasmine-core": "~2.99.1",
        "jasmine-spec-reporter": "~4.2.1",
        "karma": "~3.0.0",
        "karma-chrome-launcher": "~2.2.0",
        "karma-coverage-istanbul-reporter": "~2.0.1",
        "karma-jasmine": "~1.1.2",
        "karma-jasmine-html-reporter": "^0.2.2",
        "protractor": "~5.4.0",
        "ts-node": "~7.0.0",
        "tslint": "~5.11.0",
        "typescript": "~3.1.1"
      }
    }

另一方面,这是全局安装软件包时的错误快照...

error while npm package install globally

0 个答案:

没有答案