#[ERR_MODULE_NOT_FOUND] after upgrade from v6.0.6 to v6.1.7

4 messages · Page 1 of 1 (latest)

short pivot
#

Launching the development server as usual ("command": "./node_modules/.bin/astro dev",) causes:
Debugger attached.
Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'is-inside-container' imported from E:\path-to-project\node_modules\is-wsl\index.js
at Object.getPackageJSONURL (node:internal/modules/package_json_reader:301:9)
at packageResolve (node:internal/modules/esm/resolve:768:81)
at moduleResolve (node:internal/modules/esm/resolve:859:18)
at defaultResolve (node:internal/modules/esm/resolve:991:11)
at #cachedDefaultResolve (node:internal/modules/esm/loader:719:20)
at #resolveAndMaybeBlockOnLoaderThread (node:internal/modules/esm/loader:736:38)
at ModuleLoader.resolveSync (node:internal/modules/esm/loader:765:52)
at #resolve (node:internal/modules/esm/loader:701:17)
at ModuleLoader.getOrCreateModuleJob (node:internal/modules/esm/loader:621:35)
at ModuleJob.syncLink (node:internal/modules/esm/module_job:160:33) {
code: 'ERR_MODULE_NOT_FOUND'
}
Waiting for the debugger to disconnect...

Tried to delete node_modules and 'npm install' - no help

tall scarabBOT
#

Hi @short pivot. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

#

The knowledge sources do not contain specific information about this ERR_MODULE_NOT_FOUND error for is-inside-container / is-wsl when upgrading from Astro v6.0.6 to v6.1.7.

However, based on what the knowledge sources do cover, here are a few things worth noting:

What the error indicates:
The error suggests that the is-wsl package (a dependency somewhere in your tree) cannot find its own peer/sub-dependency is-inside-container. This is a missing transitive dependency issue, not directly an Astro configuration problem.

Suggested steps to try:

  1. Clean install more thoroughly — deleting node_modules and package-lock.json (or your lockfile) before reinstalling can help resolve stale dependency trees:

    rm -rf node_modules package-lock.json
    npm install
    
  2. Check Node version — Astro v6 requires Node 22.12.0 or higher. Running an older Node version can cause unexpected module resolution errors. [Node 22 requirement]

    node -v
    
  3. Use the official upgrade tool to ensure all Astro-related packages are on compatible versions: [Upgrade Astro]

    npx @astrojs/upgrade
    

Beyond these suggestions, the knowledge sources don't contain enough detail about this specific error to provide further guidance. I'd recommend checking Astro's GitHub issues to see if others have reported the same problem after the v6.1.7 upgrade. [Known Issues]

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:

#

@short pivot Kapa.ai is still learning and improving, please let me know how I did by reacting below.