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

Embroider build fails #59

Closed
anehx opened this issue Mar 22, 2022 · 8 comments
Closed

Embroider build fails #59

anehx opened this issue Mar 22, 2022 · 8 comments

Comments

@anehx
Copy link

anehx commented Mar 22, 2022

Thanks for your work on this addon @josemarluedke ! I was astonished to see that this is already a v2 addon. I'm trying to reach embroider support in a project I'm working on and stumbled upon a weird error with ember-focus-trap:

ERROR in ./modifiers/focus-trap.js 1:0-67
Module not found: Error: Can't resolve 'ember-focus-trap/modifiers/focus-trap.js' in '$TMPDIR/embroider/ed96c5/packages/workflow/tests/dummy/modifiers'
resolve 'ember-focus-trap/modifiers/focus-trap.js' in '$TMPDIR/embroider/ed96c5/packages/workflow/tests/dummy/modifiers'
  Parsed request is a module
  using description file: $TMPDIR/embroider/ed96c5/packages/workflow/tests/dummy/package.json (relative path: ./modifiers)
    Field 'browser' doesn't contain a valid alias configuration
    resolve as module
      $TMPDIR/embroider/ed96c5/packages/workflow/tests/dummy/modifiers/node_modules doesn't exist or is not a directory
      looking for modules in $TMPDIR/embroider/ed96c5/packages/workflow/tests/dummy/node_modules
        $TMPDIR/embroider/ed96c5/packages/workflow/tests/dummy/node_modules/ember-focus-trap doesn't exist
      $TMPDIR/embroider/ed96c5/packages/workflow/tests/node_modules doesn't exist or is not a directory
      looking for modules in $TMPDIR/embroider/ed96c5/packages/workflow/node_modules
        $TMPDIR/embroider/ed96c5/packages/workflow/node_modules/ember-focus-trap doesn't exist
      $TMPDIR/embroider/ed96c5/packages/node_modules doesn't exist or is not a directory
      looking for modules in $TMPDIR/embroider/ed96c5/node_modules
        $TMPDIR/embroider/ed96c5/node_modules/ember-focus-trap doesn't exist
      $TMPDIR/embroider/node_modules doesn't exist or is not a directory
      $TMPDIR/node_modules doesn't exist or is not a directory
      /node_modules doesn't exist or is not a directory
 @ ./assets/dummy.js 482:13-50

https://github.com/projectcaluma/ember-caluma/runs/5642751482

I don't see an obvious reason for this issue, do you see what could be wrong?

@josemarluedke
Copy link
Owner

Hey @anehx! This issue seems a bit strange as the addon is tested against embroider and it is passing.

I have seen something similar to this issue in other project, and I resolved by making sure I had webpack ^5.67.0 in my deps.

@josemarluedke
Copy link
Owner

I just came across this in one of my projects. It seems that embroider doesn't import correctly a v2 addon file when that is being used in an addon. I solved this issue by adding ember-focus-trap as dev dependency of my app.

@anehx
Copy link
Author

anehx commented Mar 24, 2022

Alright, thanks for the hint! Is there an issue in embroider for this?

@josemarluedke
Copy link
Owner

I'm not sure if there is an issue for this. Could you get that issue going?

@SanderKnauff
Copy link

I had a similar issue with a pretty clean project as well. Moving ember-focus-trap from devDependencies to dependencies seems to have fixed it for me.

@simonihmig
Copy link
Contributor

I can confirm that behavior you have described here! Reported: embroider-build/embroider#1175

@betocantu93
Copy link

Yeah, I also faced this and just added instructions in the readme

prysmex/ember-eui#89

@josemarluedke
Copy link
Owner

It seems this issue has been fixed upstreem in emborider: embroider-build/embroider#1278

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

5 participants