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: [o2:runtime] External modules are not supported when generating new project following getting started docs #2031

Closed
ElijahKotyluk opened this issue Apr 23, 2024 · 4 comments

Comments

@ElijahKotyluk
Copy link

What is the location of your example repository?

No response

Which package or tool is having this issue?

CLI

What version of that package or tool are you using?

3.58.0

What version of Remix are you using?

@shopify/remix-oxygen: ^2.0.4

Steps to Reproduce

Follow the docs( https://shopify.dev/docs/custom-storefronts/hydrogen/getting-started ) and generate a new project, connect the project and complete the scaffolding and setup process.
You will then be asked to cd into your new project's directory and run the following command:

npm run dev

Expected Behavior

The project will run without any errors when generating a new project from the getting started scaffold.

Actual Behavior

Error: [o2:runtime] External modules are not supported: "file:///../path/to/project/node_modules/@remix-run/react/dist/index.js"

@blittle
Copy link
Contributor

blittle commented Apr 23, 2024

I'm sorry about this, a commit in the latest version of Remix breaks Hydrogen. We are working with the Remix team to resolve this asap. In the mean time, please pin your project to Remix 2.8.1.

@ElijahKotyluk
Copy link
Author

@blittle Thank you for the prompt response, greatly appreciated.

Going to leave this extra bit here for anyone else who may run into this issue:
I ended up pinning all @remix/* packages in the repository to 2.8.1 which led to another error:

Error: Cannot find package 'undici' imported from /path/to/project/node_modules/@shopify/mini-oxygen/dist/worker/devtools.js
    Code: ERR_MODULE_NOT_FOUND

To fix this, just add the undici package and all should run fine.

@blittle
Copy link
Contributor

blittle commented Apr 24, 2024

This is the fix on Remix's end. We are waiting for a 2.9.1 release.

@brophdawg11
Copy link

remix@2.9.1 is published - https://github.com/remix-run/remix/releases/tag/remix%402.9.1

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