Я изменил плагин и добавил его в файловую систему моего проекта. Так что в моем package.json у меня есть: "some-module": "file:modules/some-module"
.
Он отлично работает на моей машине (Windows), но не на нашем сервере сборки (Linux CentOS), который завершается с ошибкой во время компиляции веб-пакета с ошибкой: Module not found: Error: Can't resolve 'some-module'
.
Сервер сборки очищает рабочее пространство перед сборкой, а после неудачной сборки плагин существует в папке «node_modules» рабочего пространства.
Что может вызвать эту ошибку, если плагин существует?
РЕДАКТИРОВАТЬ: я пытался на другой машине Linux (CentOS) и сборка не удалось из-за той же ошибки.
EDIT2: я изменил локальную ссылку file:
в моем файле package.json на .tar.gz git URL
. Ошибка сейчас:
ERROR in ../node_modules/nativescript-pdfview-ng/pdfview-ng.ts
Module build failed (from ../node_modules/@ngtools/webpack/src/index.js):
Error: /root/myProject/node_modules/nativescript-pdfview-ng/pdfview-ng.ts is missing from the TypeScript compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property.
The missing file seems to be part of a third party library. TS files in published libraries are often a sign of a badly packaged library. Please open an issue in the library repository to alert its author and ask them to package the library using the Angular Package Format ([link][1]).
at AngularCompilerPlugin.getCompiledFile (/root/myProject/node_modules/@ngtools/webpack/src/angular_compiler_plugin.js:719:23)
at plugin.done.then (/root/myProject/node_modules/@ngtools/webpack/src/loader.js:41:31)
at process._tickCallback (internal/process/next_tick.js:68:7)