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

Unknown object passed to sourceOfConfig() error #787

Open
experfy-ismetbibic opened this issue Oct 7, 2021 · 6 comments
Open

Unknown object passed to sourceOfConfig() error #787

experfy-ismetbibic opened this issue Oct 7, 2021 · 6 comments

Comments

@experfy-ismetbibic
Copy link

Hello,
We're trying to incorporate ember-bootstrap addon in one of our engines, however we're running into some issues.
When starting the host app which has the engine mounted we're getting the following error:
unknown object passed to sourceOfConfig(). You can only pass back the configs you were given.

Seems like the issue is not on the ember-bootstrap side (ember-bootstrap/ember-bootstrap#1626) considering when downgrading the ember-engines version to 0.8.15 the error doesn't appear.

ERROR Summary:

  - broccoliBuilderErrorStack: [undefined]
  - code: [undefined]
  - codeFrame: [undefined]
  - errorMessage: unknown object passed to sourceOfConfig(). You can only pass back the configs you were given.
  - errorType: [undefined]
  - location:
    - column: [undefined]
    - file: [undefined]
    - line: [undefined]
  - message: unknown object passed to sourceOfConfig(). You can only pass back the configs you were given.
  - name: Error
  - nodeAnnotation: [undefined]
  - nodeName: [undefined]
  - originalErrorMessage: [undefined]
  - stack: Error: unknown object passed to sourceOfConfig(). You can only pass back the configs you were given.
    at /home/admin/Desktop/projects/frontend-core/node_modules/ember-engines/node_modules/@embroider/macros/src/macros-config.js:323:19
    at /home/admin/Desktop/projects/frontend-core/node_modules/ember-engines/node_modules/@embroider/macros/src/macros-config.js:315:76
    at arrayAggregator (/home/admin/Desktop/projects/frontend-core/node_modules/lodash/_arrayAggregator.js:17:32)
    at Object.default (/home/admin/Desktop/projects/frontend-core/node_modules/lodash/_createAggregator.js:19:12)
    at defaultMerger (/home/admin/Desktop/projects/frontend-core/node_modules/ember-engines/node_modules/@embroider/macros/src/macros-config.js:315:61)
    at MacrosConfig.get userConfigs [as userConfigs] (/home/admin/Desktop/projects/frontend-core/node_modules/ember-engines/node_modules/@embroider/macros/src/macros-config.js:182:55)
    at Object.get userConfigs [as userConfigs] (/home/admin/Desktop/projects/frontend-core/node_modules/ember-engines/node_modules/@embroider/macros/src/macros-config.js:210:29)
    at _clone (/home/admin/Desktop/projects/frontend-core/node_modules/clone/clone.js:162:31)
    at _clone (/home/admin/Desktop/projects/frontend-core/node_modules/clone/clone.js:162:18)
@jonchay
Copy link

jonchay commented Oct 21, 2021

We're seeing this issue as well, but we're not using ember-bootstrap.

@abel-n
Copy link

abel-n commented Oct 29, 2021

I had the same issue when I tried including a private ember addon in dependencies. Moving it to devDependencies made the error disappear (downgrading engines to 0.8.15 did not help).

I do have another issue, though, which is probably totally unrelated. Moving the addon to dependencies was a way of me trying to solve that other issue, that's when I bumped into this one.

@abel-n
Copy link

abel-n commented Oct 29, 2021

Quick follow-up, the solution is definitely not moving things to devDependencies as mentioned in the linked issue.

@abel-n
Copy link

abel-n commented Oct 29, 2021

Not sure where the issue lies but I saw that @embroider/macros was printing the error and I managed to get it working by:

  • downgrading ember-engines to 0.8.15 as @experfy-ismetbibic suggested
  • and also setting ember-basic-dropdown resolution to 3.0.19 (in our project it is included as a dependency of ember-power-select)

That way @embroider/macros resolved to 0.42.3 tops and things seem to work fine.
It also helped that I saw that in our private addon a full package reinstall (deleting lockfile) made this error appear, without any engine usage, so I suspect this is not related to ember-engines in the end.

@Maxhy
Copy link

Maxhy commented Feb 28, 2022

I've got the same issue here but I cannot downgrade to @embroider/macros 0.42.3 as other dependencies requires upper versions...
I guess ember-engines needs to be updated to properly support new @embroider/macros versions?
Not sure if it is related but a breaking changes has been added on https://github.com/embroider-build/embroider/blob/7e5b1fe5398ed6b7ff81f4d65fabcbeac7b2930b/CHANGELOG.md#v0430-2021-07-13 ...

@Maxhy
Copy link

Maxhy commented Feb 28, 2022

I fixed the issue by bumping ember-bootstrap and other dependencies to newer versions (and one downgrade). Definitely a @embroider/macros version mismatch issue between multiple dependencies ; but nothing specific to ember-engines to be fixed in practice indeed.

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

4 participants