Angular 5 - Ошибка при запуске команды npm run packagr для создания файла tarball - PullRequest
0 голосов
/ 19 ноября 2018

Я пытался создать файл tarball для моего проекта angular 5, но я всегда получаю сообщение об ошибке ниже, я пробовал много вещей, таких как удаление node.js и переустановка, удаление модулей узла, обновление версии машинописного текста.Кто-нибудь может предоставить несколько указателей по этому вопросу?

Версия машинописного текста: ~ 2.5.3

BUILD ERROR
node_modules/@types/jasmine/index.d.ts(138,47): error TS1005: ';' expected.
node_modules/@types/jasmine/index.d.ts(138,90): error TS1005: '(' expected.
node_modules/@types/jasmine/index.d.ts(138,104): error TS1005: ']' expected.
node_modules/@types/jasmine/index.d.ts(138,112): error TS1005: ',' expected.
node_modules/@types/jasmine/index.d.ts(138,113): error TS1136: Property assignment expected.
node_modules/@types/jasmine/index.d.ts(138,121): error TS1005: ')' expected.
node_modules/@types/jasmine/index.d.ts(138,147): error TS1005: '(' expected.
node_modules/@types/jasmine/index.d.ts(138,162): error TS1005: ']' expected.
node_modules/@types/jasmine/index.d.ts(138,163): error TS1005: ',' expected.
node_modules/@types/jasmine/index.d.ts(138,164): error TS1136: Property assignment expected.
node_modules/@types/jasmine/index.d.ts(138,165): error TS1136: Property assignment expected.
node_modules/@types/jasmine/index.d.ts(138,179): error TS1005: ',' expected.
node_modules/@types/jasmine/index.d.ts(138,183): error TS1005: ':' expected.
node_modules/@types/jasmine/index.d.ts(138,208): error TS1005: '{' expected.
node_modules/@types/jasmine/index.d.ts(138,217): error TS1005: ':' expected.
node_modules/@types/jasmine/index.d.ts(138,222): error TS1005: ',' expected.
node_modules/@types/jasmine/index.d.ts(138,227): error TS1005: ':' expected.
node_modules/@types/jasmine/index.d.ts(138,228): error TS1109: Expression expected.
node_modules/@types/jasmine/index.d.ts(138,230): error TS1005: ')' expected.

Error: node_modules/@types/jasmine/index.d.ts(138,47): error TS1005: ';' expected.
node_modules/@types/jasmine/index.d.ts(138,90): error TS1005: '(' expected.
node_modules/@types/jasmine/index.d.ts(138,104): error TS1005: ']' expected.
node_modules/@types/jasmine/index.d.ts(138,112): error TS1005: ',' expected.
node_modules/@types/jasmine/index.d.ts(138,113): error TS1136: Property assignment expected.
node_modules/@types/jasmine/index.d.ts(138,121): error TS1005: ')' expected.
node_modules/@types/jasmine/index.d.ts(138,147): error TS1005: '(' expected.
node_modules/@types/jasmine/index.d.ts(138,162): error TS1005: ']' expected.
node_modules/@types/jasmine/index.d.ts(138,163): error TS1005: ',' expected.
node_modules/@types/jasmine/index.d.ts(138,164): error TS1136: Property assignment expected.
node_modules/@types/jasmine/index.d.ts(138,165): error TS1136: Property assignment expected.
node_modules/@types/jasmine/index.d.ts(138,179): error TS1005: ',' expected.
node_modules/@types/jasmine/index.d.ts(138,183): error TS1005: ':' expected.
node_modules/@types/jasmine/index.d.ts(138,208): error TS1005: '{' expected.
node_modules/@types/jasmine/index.d.ts(138,217): error TS1005: ':' expected.
node_modules/@types/jasmine/index.d.ts(138,222): error TS1005: ',' expected.
node_modules/@types/jasmine/index.d.ts(138,227): error TS1005: ':' expected.
node_modules/@types/jasmine/index.d.ts(138,228): error TS1109: Expression expected.
node_modules/@types/jasmine/index.d.ts(138,230): error TS1005: ')' expected.

    at Object.<anonymous> (C:\Project\node_modules\ng-packagr\lib\ngc\compile-source-files.js:69:35)
    at Generator.next (<anonymous>)
    at C:\Project\node_modules\ng-packagr\lib\ngc\compile-source-files.js:7:71
    at new Promise (<anonymous>)
    at __awaiter (C:\Project\node_modules\ng-packagr\lib\ngc\compile-source-files.js:3:12)
    at Object.compileSourceFiles (C:\Project\node_modules\ng-packagr\lib\ngc\compile-source-files.js:19:12)
    at Object.<anonymous> (C:\Project\node_modules\ng-packagr\lib\ng-v5\entry-point\ts\compile-ngc.transform.js:37:60)
    at Generator.next (<anonymous>)
    at C:\Project\node_modules\ng-packagr\lib\ng-v5\entry-point\ts\compile-ngc.transform.js:7:71
    at new Promise (<anonymous>)

npm ERR! code ELIFECYCLE
npm ERR! errno 111
npm ERR! cg510-rdop-task-common@0.0.0 packagr: `ng-packagr -p ng-package.json`
npm ERR! Exit status 111
npm ERR!
npm ERR! Failed at the cg510-rdop-task-common@0.0.0 packagr script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\AppData\Roaming\npm-cache\_logs\2018-11-19T08_44_03_672Z-debug.log

Package.json

{
    "name": "cg510-rdop-task-common",
    "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",
        "packagr": "ng-packagr -p ng-package.json"
    },
    "private": true,
    "devDependencies": {
        "@angular/animations": "^5.2.0",
        "@angular/cdk": "^5.2.4",
        "@angular/cli": "~1.7.3",
        "@angular/common": "^5.2.0",
        "@angular/compiler": "^5.2.0",
        "@angular/compiler-cli": "^5.2.0",
        "@angular/core": "^5.2.0",
        "@angular/forms": "^5.2.0",
        "@angular/http": "^5.2.0",
        "@angular/language-service": "^5.2.0",
        "@angular/material": "^5.2.4",
        "@angular/platform-browser": "^5.2.0",
        "@angular/platform-browser-dynamic": "^5.2.0",
        "@angular/router": "^5.2.0",
        "@types/jasminewd2": "~2.0.2",
        "@types/node": "~6.0.60",
        "codelyzer": "^4.0.1",
        "core-js": "^2.4.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",
        "karma-junit-reporter": "~1.2.0",
        "ng-packagr": "^2.4.5",
        "ngx-scroll-event": "^1.0.8",
        "protractor": "~5.1.2",
        "rxjs": "^5.5.6",
        "ts-node": "~4.1.0",
        "tslint": "~5.9.1",
        "typescript": "~2.5.3",
        "zone.js": "^0.8.19",
        "@types/jasmine": "^2.8.9"
    },
    "peerDependencies": {

    }
}
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...