Skip to content

Cannot find package 'mem-fs' imported from #800

Open
@chk4658

Description

@chk4658

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.<anonymous> (internal/modules/esm/module_job.js:72:40)
    at link (internal/modules/esm/module_job.js:71:36)

My environment

  • OS version/details: eg. Windows 10 64-bit
  • Node version: v14.17.2 (run node --version in your terminal)
  • npm version: 6.14.13 (run npm --version in your terminal)
  • Version of yo : 5.0.0 (run yo --version in your terminal)

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]

+ [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.<anonymous> (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

Paste your error output over here

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    • Status

      Up Next

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions