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

Cannot find module '...' error when run under Yarn PnP #299

Open
djsavvy opened this issue Jul 29, 2022 · 0 comments
Open

Cannot find module '...' error when run under Yarn PnP #299

djsavvy opened this issue Jul 29, 2022 · 0 comments

Comments

@djsavvy
Copy link

djsavvy commented Jul 29, 2022

I am using node v16.16.0.

When I try to yarn yarn node-dev server.js, I get the following error:

Error [ERR_MODULE_NOT_FOUND]: Cannot find module 'C:\Users\sraghuvanshi\src\EXPLOR\app\.yarn\cache\node-dev-npm-7.4.3-207a6050f3-7b7e77284f.zip\node_modules\node-dev\lib\loaders\load.mjs' imported from C:\Users\sraghuvanshi\src\EXPLOR\app\
Did you mean to import C:/Users/sraghuvanshi/src/EXPLOR/app/.yarn/cache/node-dev-npm-7.4.3-207a6050f3-7b7e77284f.zip/node_modules/node-dev/lib/loaders/load.mjs?

Note that the issue is simply one of back vs forward slashes. I see that resolve is the latest version in node-dev's package.json, so that's not the issue.

Also, adding the argument --require ./.pnp.cjs had no effect.

Any ideas for what might be going wrong here?

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

1 participant