Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linking custom addon, which uses ember-fontawesome, in app fails to build. #106

Open
teejayhh opened this issue May 13, 2019 · 3 comments
Open

Comments

@teejayhh
Copy link

I have the following setup. Ember cli 3.5

  • Made an addon (SampleAddon) which uses the font-awesome package.
  • Made an app (SampleApp) which also uses the font-awesome package
  • followed the addon usage instructions and added font-lib and fontawesome package the the dependency section.
  • yarn link (in SampleAddon)
  • yarn link 'SampleAddon' (in SampleApp)
  • start up the app (SampleApp) server
  • 💥
Build Error (broccoli-fontawesome-pack: free-regular-svg-icons)
Cannot find module '@fortawesome/free-regular-svg-icons'

Could someone please verify this or has come across this as well.

Best regards Thomas

@teejayhh
Copy link
Author

Ok I found the issue, if your app uses
@fortawesome/free-regular-svg-icons
and your addon doesn't, then you will get this issue.

@jrjohnson
Copy link
Collaborator

@teejayhh thanks for the report. This may be an issue with yarn link. Unlike npm link yarn doens't install new dependencies when it is linked. So adding @fortawesome/free-regular-svg-icons do the addon dependencies will only work when that addon is installed into the app with npm add.

To work around this in the past I've pushed the addon branch up to github and then used something like yarn add username/repo#branch-name to install it into my app for testing.

@jnkroeker
Copy link

seeing the same issue usingnpm link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants