Я пытаюсь создать проект типа с дженкинсами. Но когда я запускаю tsc, я получаю ошибки относительно не относительного импорта из файлов машинописных файлов.машинописный tsc-код TS2307: Не удается найти модуль '@ angular/core'
Вот выдержка из сборника.
+ ls node_modules/@angular/
common
compiler
core
http
platform-browser
platform-browser-dynamic
router
router-deprecated
+ tsc
client/dev/marvel-app/app.component.ts(2,25): error TS2307: Cannot find module '@angular/core'.
client/dev/marvel-app/app.component.ts(3,9): error TS2305: Module '"/root/.jenkins/jobs/marvel-encyclopedia/workspace/node_modules/@angular/router-deprecated/index"' has no exported member 'RouteConfig'.
client/dev/marvel-app/helpers/parallax.directive.ts(8,17): error TS2307: Cannot find module '@angular/core'.
client/dev/marvel-app/modules/filter/filter.component.ts(1,51): error TS2307: Cannot find module '@angular/core'.
client/dev/marvel-app/modules/go-back-up/go-back-up.component.ts(1,25): error TS2307: Cannot find module '@angular/core'.
client/dev/marvel-app/modules/graph/graph.component.ts(1,100): error TS2307: Cannot find module '@angular/core'.
client/dev/marvel-app/modules/grid/grid.component.ts(1,62): error TS2307: Cannot find module '@angular/core'.
client/dev/marvel-app/modules/header/header.component.ts(1,25): error TS2307: Cannot find module '@angular/core'.
client/dev/marvel-app/modules/navbar/navbar.component.ts(1,25): error TS2307: Cannot find module '@angular/core'.
client/dev/marvel-app/modules/search/search.component.ts(1,51): error TS2307: Cannot find module '@angular/core'.
client/dev/marvel-app/modules/search/search.component.ts(2,23): error TS2307: Cannot find module '@angular/common'.
здесь содержание моего файла tsconfig.json:
{
"compilerOptions": {
"module": "commonjs",
"moduleResolution": "node",
"target": "es5",
"sourceMap": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"noImplicitAny": false
},
"exclude": [
"node_modules",
"typings",
"typings/main",
"typings/main.d.ts"
],
"filesGlob": [
"**/*.ts",
"typings/main",
"typings/main.d.ts"
]
}
Я попытался локально на моем Mac, и она отлично работает. Дженкинс находится на линейной машине.
EDIT: На самом деле ошибка возникла из-за плохой установки узлов. удаление node_modules
и переустановка исправление эта проблема.