tonysamperi / ngx-popperjs

An Angular 8+ wrapper for @popperjs/core
https://tonysamperi.github.io/ngx-popperjs/
MIT License
65 stars 12 forks source link

BUG: Problem running ng build with angular 14 and ngx-popperjs 14.0.1 #29

Closed AdamsContreras999 closed 2 years ago

AdamsContreras999 commented 2 years ago

We have installed the ngx-popperjs 14.0.1 dependency and with angular 14 but when running ng build gives this error, before with version 13.0.1 of ngx-popperjs worked fine with angular 14 but now it does not work I do not know what is the reason for this

** Versions

ERROR in console /node_modules/ngx-popperjs/fesm2015/ngx-popperjs.mjs:9:0-45 - Error: Module not found: Error: Can't resolve '@ngx-tonysamperi/dom' in 'C:\xampp\htdocs\project\node_modules\ngx-popperjs\fesm2015'

Error: node_modules/ngx-popperjs/lib/ngx-popperjs.module.d.ts:7:21 - error TS2307: Cannot find module '@ngx-tonysamperi/dom' or its corresponding type declarations.

7 import * as i4 from "@ngx-tonysamperi/dom";


Error: node_modules/ngx-popperjs/lib/ngx-popperjs/ngx-popperjs.directive.d.ts:7:31 - error TS2307: Cannot find module '@ngx-tonysamperi/dom' or its corresponding type declarations.

7 import { SmpDomService } from "@ngx-tonysamperi/dom";
belugasanity commented 2 years ago

Experience same issue when trying to run build script

✔ Browser application bundle generation complete.

./src/main.ts - Error: Module build failed (from ./node_modules/@ngtools/webpack/src/ivy/index.js):
Error: Cannot resolve type entity i4.SmpDomModule to symbol
    at /Users/name/Documents/Projects/my-project/node_modules/@ngtools/webpack/src/ivy/loader.js:81:18
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

./src/polyfills.ts - Error: Module build failed (from ./node_modules/@ngtools/webpack/src/ivy/index.js):
Error: Cannot resolve type entity i4.SmpDomModule to symbol
    at /Users/name/Documents/Projects/my-project/node_modules/@ngtools/webpack/src/ivy/loader.js:81:18
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

Error: node_modules/ngx-popperjs/lib/ngx-popperjs.module.d.ts:7:21 - error TS2307: Cannot find module '@ngx-tonysamperi/dom' or its corresponding type declarations.

7 import * as i4 from "@ngx-tonysamperi/dom";
                      ~~~~~~~~~~~~~~~~~~~~~~

Error: node_modules/ngx-popperjs/lib/ngx-popperjs/ngx-popperjs.directive.d.ts:7:31 - error TS2307: Cannot find module '@ngx-tonysamperi/dom' or its corresponding type declarations.

7 import { SmpDomService } from "@ngx-tonysamperi/dom";

Also using node 16 but also failing on node 14

tonysamperi commented 2 years ago

The solution looks quite obvious. I'll patch this as soon as possible though.

tonysamperi commented 2 years ago

Fixed in v 14.0.2, deprecated v 14.0.1, because it actually had a useless dependency considering Angular 14 new features.