Closed iamsank8 closed 4 years ago
I'm not familiar with Angular. Can you create a minimal reproduction of the issue?
Hi I have created this project. please use "npm install" using command prompt. Please let me know if you need more help running this project.
I have the same issue Module '"..//node_modules/idb/with-async-ittr"' has no exported member 'openDB'.
@Sankey28 did you forget the link to the project?
Sorry my bad. Here it is https://github.com/Sankey28/angular5-idb
@Sankey28
Here's the result of npm run start
:
> my-angular-project@0.0.0 start /Users/jakearchibald/dev/tmp/angular5-idb
> ng serve
Cannot read property 'config' of null
TypeError: Cannot read property 'config' of null
at Class.run (/Users/jakearchibald/dev/tmp/angular5-idb/node_modules/@angular/cli/tasks/serve.js:51:63)
at /Users/jakearchibald/dev/tmp/angular5-idb/node_modules/@angular/cli/commands/serve.js:123:26
at processTicksAndRejections (internal/process/task_queues.js:89:5)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! my-angular-project@0.0.0 start: `ng serve`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the my-angular-project@0.0.0 start 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! /Users/jakearchibald/.npm/_logs/2020-01-29T10_29_48_488Z-debug.log
Here's the result of npm run build
:
> my-angular-project@0.0.0 build /Users/jakearchibald/dev/tmp/angular5-idb
> ng build --prod
Unable to find any apps in `.angular-cli.json`.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! my-angular-project@0.0.0 build: `ng build --prod`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the my-angular-project@0.0.0 build 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! /Users/jakearchibald/.npm/_logs/2020-01-29T10_31_16_742Z-debug.log
Neither of these errors seem to be related to idb
. Am I holding it wrong? If so, can you provide accurate steps to recreate the error you're seeing?
you first need to do npm install , which will install the currently used packages. Then you can use ng serve command to run the app. At the time of compilation itself, app will show above mentioned error in issues I raised.
Yep, I'm running npm install
.
Extract this ZIP. somehow angular-cli.json is not being uploaded to git repo. https://github.com/Sankey28/angular5-idb/blob/master/angular5-idb-zip.zip
I got this working by updating ts-node
and typescript
to their latest versions, then changing "es2017" in tsconfig.json
to "esnext".
Although, it now shows this warning: "@angular/compiler-cli@5.2.11 requires typescript@'>=2.4.2 <2.7.0' but 3.7.5 was found instead. Using this version can result in undefined behaviour and difficult to debug problems."
Unfortunately, it just seems like this project is using a too-old version of angular.
I am bound to use Angular 5 for now, that's why most of the libraries I had to used are now highly upgraded without considering backward compatibility, however this NPM packing versioning would really benefit it there would be an Angular/React/Vue version attached to it for reference.
This isn't a problem with Vue and React. It's a problem with Angular because it wants to control the building of the project too.
I am getting below errors while serving the application.
ERROR in node_modules/idb/with-async-ittr.d.ts(1,15): error TS2691: An import path cannot end with a '.d.ts' extension. Consider importing './build/esm/index' instead. src/app/shared/services/data.service.ts(10,10): error TS2305: Module '"D:/DEV/HSE/ARA.WebApp/node_modules/idb/with-async-ittr"' has no exported member 'openDB'.