-
-
Notifications
You must be signed in to change notification settings - Fork 404
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! |
This doesn't reproduce for me.
But, I think it's really an issue with generators and not with
If I'm right, the correct resolution for this issue is to get generators such as https://github.com/microsoft/vscode-generator-code to explicitly declare their dependency on Tagging in @UlisesGascon for another set of eyes, does that seem right to you? See also: yeoman/generator#1493, yeoman/generator#1502. |
+1 I think is the best solution |
Its actually in more recent versions of npm. Back when this was written, npm would install peerDependencies where it found them. Then the behavior changed to not install peerDeps. This caused a lot of frustration and npm has gone back and forth on the issue. A better approach might be to list Also, this issue should probably be moved to https://github.com/yeoman/environment as that is where it is defined, not here. Its also odd thats it both a dep and a peerDep there |
🤔 sorry, I'm a bit lost - |
You need fix global installed mem-fs yarn global add mem-fs
npm install mem-fs --global
# may need , if you are pnpm
pnpm install mem-fs --global For reason detail you can see this 👉 [#803 ](#803 (comment)) |
@IOLOII I don't think that's the right long-term solution. It might fix things for now but it doesn't resolve the root issue. That is, packages shouldn't need to rely on global installations for dependencies like In fact, I would recommend folks don't install |
Type of issue
npm install -g yo generator-code
and yo code failed
My environment
eg. Windows 10 64-bit
v14.17.2
(runnode --version
in your terminal)6.14.13
(runnpm --version
in your terminal)5.0.0
(runyo --version
in your terminal)Expected behavior
Need an upgrade for node? or downgrade yo. What should I do?
Current behavior
Steps to reproduce the behavior
Command line output
The text was updated successfully, but these errors were encountered: