Closed jerriclynsjohn closed 3 years ago
I'm seeing a similar problem on a Mac, Node 16.2.0, NPM 7.13.0 and the Astro project references "0.18.0-next.3"
node:internal/modules/cjs/loader:941
const err = new Error(message);
^
Error: Cannot find module '/Users/matt/Code/sample/node_modules/astro/snowpack-plugin-jsx.cjs'
Require stack:
- /Users/matt/Code/sample/node_modules/snowpack/lib/cjs/util.js
- /Users/matt/Code/sample/node_modules/snowpack/lib/cjs/commands/add-rm.js
- /Users/matt/Code/sample/node_modules/snowpack/lib/cjs/index.js
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:941:15)
at Function.Module._load (node:internal/modules/cjs/loader:774:27)
at Module.require (node:internal/modules/cjs/loader:1013:19)
at Object.require [as NATIVE_REQUIRE] (node:internal/modules/cjs/helpers:93:18)
at loadPluginFromConfig (/Users/matt/Code/sample/node_modules/snowpack/lib/cjs/config.js:285:34)
at /Users/matt/Code/sample/node_modules/snowpack/lib/cjs/config.js:315:24
at Array.forEach (<anonymous>)
at loadPlugins (/Users/matt/Code/sample/node_modules/snowpack/lib/cjs/config.js:312:20)
at normalizeConfig (/Users/matt/Code/sample/node_modules/snowpack/lib/cjs/config.js:434:39)
at createConfiguration (/Users/matt/Code/sample/node_modules/snowpack/lib/cjs/config.js:656:30)
at loadConfiguration (/Users/matt/Code/sample/node_modules/snowpack/lib/cjs/config.js:734:16)
at async createSnowpack (file:///Users/matt/Code/sample/node_modules/astro/dist/runtime.js:275:26)
at async createRuntime (file:///Users/matt/Code/sample/node_modules/astro/dist/runtime.js:335:7)
at async dev (file:///Users/matt/Code/sample/node_modules/astro/dist/dev.js:17:19) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/Users/matt/Code/sample/node_modules/snowpack/lib/cjs/util.js',
'/Users/matt/Code/sample/node_modules/snowpack/lib/cjs/commands/add-rm.js',
'/Users/matt/Code/sample/node_modules/snowpack/lib/cjs/index.js'
]
}
Thanks for filing! This was a next release that wasn't meant to go out under latest. Just fixed it, and npm init astro should be working again
What package manager are you using?
npm v7.20.0
What operating system are you using?
Windows
Describe the Bug
The project throws an error right after initialization.
Steps to Reproduce
npm init astro
using template Svelte Componentsnpm install
npm run start
Link to Minimal Reproducible Example (Optional)
No response