Error when using with Angular 6.0
I got this error when using with angular 6.0:
ERROR in ./node_modules/angular2-indexeddb/index.ts Module build failed: Error: ....\ui\node_modules\angular2-indexeddb\index.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 askthem to package the library using the Angular Package Format (https://goo.gl/jB3GVv). at AngularCompilerPlugin.getCompiledFile (.....\ui\node_modules@ngtools\webpack\src\angular_compiler_plugin.js:708:23) at plugin.done.then (.......\ui\node_modules@ngtools\webpack\src\loader.js:41:31) at
at process._tickCallback (internal/process/next_tick.js:188:7)
Thanks.
Removing the .ts files from my local installation of the package made it work.
Is there any reason why the .ts files are distributed with the npm package?
Also, having .ts files in the package does not work well with webpack's watch feature (so I have to remove them myself from the local installation folder as well).
Will it be fixed?
add the following code to tsconfig.app.json did the trick.
"include": [
"../src/**/*",
"../node_modules/angular2-indexeddb/index.ts",
"../node_modules/angular2-indexeddb/angular2-indexeddb.ts",
]
Adding those files to the include causes linting to fail, as they don't pass lint standards. Please fix this soon.
A temporary solution is to update your package.json and add the following to your scripts section:
"postinstall": "rm node_modules/angular2-indexeddb/*.ts"
This will delete the files after an npm install
I have this same issue with angular 7.1.0
When will this be resolved?
Error: [redacted]\node_modules\angular2-indexeddb\index.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 (https://goo.gl/jB3GVv). at AngularCompilerPlugin.getCompiledFile ([redacted]\node_modules@ngtools\webpack\src\angular_compiler_plugin.js:719:23) at plugin.done.then ([redacted]\node_modules@ngtools\webpack\src\loader.js:41:31) at
at process._tickCallback (internal/process/next_tick.js:188:7)