node-dev
node-dev copied to clipboard
Cannot find module '...' error when run under Yarn PnP
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?