2 years ago
#71214

Omar
Angular Element - "failed to resolve only because it was resolved as fully specified"
I have an angular element (within an nx workspace). when i use it in another angular project I get TypeScript dependency errors.
It seems my elements cannot inherit any dependancies (or use peerDependancies) from its' host node_modules because of these errors.
The screenshot shows the errors caused by adding my angular element to another angular app.
../met-libs-nx/dist/libs/core/fesm2015/jomatech-core.mjs:7:0-47 - Error: Module not found: Error: Can't resolve '@angular/fire/database' in '/Users/omar/Sites/met-libs-nx/dist/libs/core/fesm2015' Did you mean 'angular-fire-database.js'? BREAKING CHANGE: The request '@angular/fire/database' failed to resolve only because it was resolved as fully specified (probably because the origin is a '.mjs' file or a '.js' file where the package.json contains '"type": "module"'). The extension in the request is mandatory for it to be fully specified. Add the extension to the request.
I assume i need to build my angular element (module) dependancies differently? What do you need to see?
the internet says updating webpack config is the way to go but how do i do that in an angular env?
package.json
ng-package.json
tsconfig.lib.json
tsconfig.lib.prod.json
angular
nrwl-nx
angular-elements
0 Answers
Your Answer