ionic-team / ionicons

Premium hand-crafted icons built by Ionic, for Ionic apps and web apps everywhere 🌎
http://ionicons.com
MIT License
17.4k stars 2.06k forks source link

Could not resolve './components' from ./node_modules/ionicons/dist/collection/index.js #848

Closed Scan0815 closed 3 years ago

Scan0815 commented 3 years ago

Hello, after the update to @ ionic / core ":" ^ 5.2.2 " ionicons was updated too, unfortunately there is now a build error from stenciljs.

[ERROR] Rollup: Unresolved import
           Could not resolve './components' from ./node_modules/ionicons/dist/collection/index.js

an export has apparently been added here export * from './components';

in the directory components, there are only sub directories.

if i remove the export from index.js, it works!

Best greetings

jwillmer commented 3 years ago

I have the same issue. Could you give me more details on how you fixed it?

Scan0815 commented 3 years ago

@jwillmer go to ./node_modules/ionicons/dist/collection/index.js

remove export * from './components';,

this is only a temp fix

or you make a fork.

Best greetings

jwillmer commented 3 years ago

I hoped there was another way since it is braking in my build pipeline :(

Scan0815 commented 3 years ago

@jwillmer only fork and make your own build, maybe @liamdebeasi see the problem and provide a new version.

jwillmer commented 3 years ago

I already got the error with "@ionic/core": "5.0.7" image

jwillmer commented 3 years ago

I looked in my local package-lock.json and sew that version 5.0.1 works but not version 5.1.0 image

Scan0815 commented 3 years ago

yes thats right with 5.0.1 it works

peterpeterparker commented 3 years ago

pinning v5.0.1 in my stencils pwa also fixing the problem

adamdbradley commented 3 years ago

This was fixed with ionicons 5.1.1. Thanks for the report! https://github.com/ionic-team/ionicons/commit/3a2ab6ec277234e49adfe7ed35ce1fb9d5fe7133

jwillmer commented 3 years ago

can confirm. it works again :)

Scan0815 commented 3 years ago

perfect thanks @adamdbradley