-
-
Notifications
You must be signed in to change notification settings - Fork 399
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 package 'mem-fs' imported from #800
Comments
same |
stiff but fixed |
Same for me, still does not work on 20.5 |
I am also facing the same issue |
yo@5 requires node 18 and npm should be at least v7, latest is recommended. |
I tried with node -v (21.5.0) and npm -v (10.2.4) but what worked for me was downgrading yo to version 4.3.1 |
@mshima is node 18 the minimum requirement or greater also works for yo@5 as in my case it didn't. |
yo must be installed with newer npm (must support peer dependencies).
|
Playing with the npm and node versions didn't work for me. It seems that this issue still persists, but what allowed me to continue was running: npm install -g yo generator-code mem-fs
yo code |
This worked for me as well. However, I need to reinstall |
The above alone didn't resolve the issue for me. The fix that I found was to:
Hilariously, there's no |
This worked for me, thanks! |
Type of issue
npm install -g yo generator-code
and yo code failed
C:\Users\KHC1SZH\chenkai\Projects\vscodePluginsDemo>yo code
Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'mem-fs' imported from C:\Users\KHC1SZH\chenkai\node-v14.17.2-win-x64\node_global\node_modules\yo\node_modules\yeoman-environment\dist\environment-base.js
at packageResolve (internal/modules/esm/resolve.js:650:9)
at moduleResolve (internal/modules/esm/resolve.js:691:18)
at Loader.defaultResolve [as _resolve] (internal/modules/esm/resolve.js:805:11)
at Loader.resolve (internal/modules/esm/loader.js:88:40)
at Loader.getModuleJob (internal/modules/esm/loader.js:241:28)
at ModuleWrap. (internal/modules/esm/module_job.js:72:40)
at link (internal/modules/esm/module_job.js:71:36)
My environment
eg. Windows 10 64-bit
x.x.x
(runnode --version
in your terminal)x.x.x
(runnpm --version
in your terminal)x.x.x
(runyo --version
in your terminal)C:\Users\KHC1SZH\chenkai\Projects\vscodePluginsDemo>node --version
v14.17.2
C:\Users\KHC1SZH\chenkai\Projects\vscodePluginsDemo>npm --version
6.14.13
C:\Users\KHC1SZH\chenkai\Projects\vscodePluginsDemo>yo --version
5.0.0
Expected behavior
Need an upgrade for node? or downgrade yo. What should I do?
Current behavior
C:\Users\KHC1SZH\chenkai\Projects\vscodePluginsDemo>npm install -g mem-fs
npm WARN notsup Unsupported engine for [email protected]: wanted: {"node":">=18.0.0"} (current: {"node":"14.17.2","npm":"6.14.13"})
npm WARN notsup Not compatible with your version of node/npm: [email protected]
added 19 packages from 81 contributors in 1.872s
C:\Users\KHC1SZH\chenkai\Projects\vscodePluginsDemo>yo code
Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'stream' imported from C:\Users\KHC1SZH\chenkai\node-v14.17.2-win-x64\node_global\node_modules\mem-fs\dist\index.js
at packageResolve (internal/modules/esm/resolve.js:650:9)
at moduleResolve (internal/modules/esm/resolve.js:691:18)
at Loader.defaultResolve [as _resolve] (internal/modules/esm/resolve.js:805:11)
at Loader.resolve (internal/modules/esm/loader.js:88:40)
at Loader.getModuleJob (internal/modules/esm/loader.js:241:28)
at ModuleWrap. (internal/modules/esm/module_job.js:72:40)
at link (internal/modules/esm/module_job.js:71:36)
Steps to reproduce the behavior
Command line output
The text was updated successfully, but these errors were encountered: