question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

fastbootDependencies are not respected (causing failure with in-repo addons)

See original GitHub issue

When building with ember-cli-fastboot@2 and @embroider/*@1.5, I’m seeing that dist/package.json includes dependencies that are not in the fastbootDependencies list in ./package.json.

While this could be problematic on its own, it also causes a build failure, because it includes in-repo addons in this list also. Because these in-repo addons are not in the npm registry (or could be totally different packages), this can:

  1. break the fastboot server build
  2. be a security risk(?) since an in-repo addon that is named the same as something else published to npm can get installed.

Here’s a repro where I show that an in-repo addon named with a @scope causes the fastboot server build to fail: https://github.com/mehulkar/embroider-in-repo-addons

(Reproduces with ember-cli-fastboot@3.2 as well)

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
mehulkarcommented, Mar 15, 2022

That makes sense. Would it make sense not to generate a dist/package.json under embroider then? It’s already doing something different, so maybe we could be more explicit about the known good pattern? (and maybe document it somewhere in embroider if it’s a transition path other users may run into)

0reactions
ef4commented, Mar 27, 2022

It would make sense to eventually drop the package.json. Right now there are still things fastboot reads from it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Recursive fastbootDependencies not discovered · Issue #188 ...
My understanding is that fastbootDependencies exists not to protect against addon authors, but to minimize the amount of code accessible inside the fastboot...
Read more >
Addon Author Guide - Ember FastBoot
Common Causes. The most common cause of failure on boot is initialization code that relies on the following global objects that aren't available...
Read more >
Imports not working in in-repo addons - General - Ember.JS
I have created an in-repo addon and then ran the below command to create a component within that in-repo addon. The component was...
Read more >
how to use in-repo-addons in the ember-engines?
I found the answer but not sure whether it is correct way or not. In the users-engine/package.json add relative path to addons
Read more >
Testing Ember Addons in a Real App Using ember-cli-addon ...
I was not aware there was even an option to run a real app, consume the addon and... ... Testing with an App;...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found