Quand j'essaie de compiler mon projet en cours d'exécution de la commande suivante:
ng build --environment=prod --aot=false --output-path="..." --base-href="..."
Vous semblez ne pas être dépendant @angular/core
.
C'est une erreur, cependant, je ne comprends pas pourquoi, parce qu'avant ça fonctionnait bien.
J'ai essayé de faire ceci:
npm install @angular/core
Mais j'ai cette erreur :
error at Error (native) error { Error: EACCES: permission denied, chown '' error at Error (native) error errno: -13, error code: 'EACCES', error syscall: 'chown', error Please try running this command again as root/Administrator. verbose exit [ -13, true ]
J'ai aussi essayé de se débarrasser de l' node_modules
, puis de faire une installation mnp: mais j'obtiens la même erreur.
Et quand je lance la commande suivante:
ng serve
J'ai une autre erreur:
The "@angular/compiler-cli" package was not properly installed. Error: Error: Cannot find module '@angular/compiler-cli'
C'est mon package.json
:
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
"@angular/animations": "^4.0.0",
"@angular/common": "^4.0.0",
"@angular/compiler": "^4.0.0",
"@angular/core": "^4.0.0",
"@angular/forms": "^4.0.0",
"@angular/http": "^4.0.0",
"@angular/platform-browser": "^4.0.0",
"@angular/platform-browser-dynamic": "^4.0.0",
"@angular/router": "^4.0.0",
"@types/jquery": "^3.2.17",
"cli-color": "^1.2.0",
"core-js": "^2.4.1",
"font-awesome": "^4.7.0",
"jquery": "^3.2.1",
"matrix-js-sdk": "^0.8.5",
"moment": "^2.18.1",
"olm": "https://matrix.org/packages/npm/olm/olm-2.2.2.tgz",
"readline": "^1.3.0",
"rxjs": "^5.4.1",
"socket.io-client": "^2.0.3",
"zone.js": "^0.8.14"
"@angular/cli": "1.2.6",
"@angular/compiler-cli": "^4.0.0",
"@angular/language-service": "^4.0.0",
"@types/jasmine": "~2.5.53",
"@types/jasminewd2": "~2.0.2",
"@types/jquery": "^3.2.17",
"@types/node": "~6.0.60",
"codelyzer": "~3.0.1",
"jasmine-core": "~2.6.2",
"jasmine-spec-reporter": "~4.1.0",
"karma": "~1.7.0",
"karma-chrome-launcher": "~2.1.1",
"karma-cli": "~1.0.1",
"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": "~3.0.4",
"tslint": "~5.3.2",
"typescript": "~2.3.3"