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

Error: Unable to resolve module poly-decomp from node_modules\matter-js\build\matter.js: poly-decomp could not be found within the project. #956

Closed
nnhjs opened this issue Jan 20, 2021 · 9 comments

Comments

@nnhjs
Copy link

nnhjs commented Jan 20, 2021

image

Help me ! I don't run project FlappyBird

@codylico
Copy link

Possibly related to #559?

@liabru
Copy link
Owner

liabru commented Jan 20, 2021

Can you give more information?

  • Can you confirm you have installed the dependency in the project e.g. npm install poly-decomp --save?
  • What was the last working version of matter-js for this?
  • What environment? npm / node version?
  • Can you share an example or project link?

@entozoon
Copy link

Same thing here. Installing the dependency manually as you suggest @liabru is a good workaround.
Issue occurs with a simple import { Engine } from "matter-js", in webpack with matter v0.16.0

@liabru
Copy link
Owner

liabru commented Jan 20, 2021

@entozoon thanks for confirming. That's not a workaround though, that's the intended approach.

I guess it should be made clearer in the docs! That said, I am hoping to be taking this out of the core project when I get around to it.

@entozoon
Copy link

Fair enough @liabru ! :)

@liabru
Copy link
Owner

liabru commented Jan 20, 2021

@entozoon Actually, are you saying you get an error even when not using Bodies.fromVertices?

This might be a webpack specific problem in that case, as I've tested this in straight node.js without seeing that.
What version of webpack? Could you share the config?

@nnhjs
Copy link
Author

nnhjs commented Jan 21, 2021

Thank you, i will install npm install poly-decomp --save .
Last, i install matter-js !

@nnhjs nnhjs closed this as completed Jan 21, 2021
@entozoon
Copy link

@liabru No buddy; installing poly-decomp fixed everything. Just needs adding to the readme and/or the error output.
I probably wouldn't have closed the issue until then @nnhunguet as it'll keep happening for people

@liabru
Copy link
Owner

liabru commented Jan 21, 2021

Thanks for confirming all, I will be looking at improving the docs and error outputs on this.

Just to check in case of a regression, @nnhunguet was this working before upgrading?

If so, how was it working? Using a global decomp?

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

No branches or pull requests

4 participants