bholmesdev / simple-stack

🌱 Web apps made simple
https://simple-stack.dev
Other
281 stars 6 forks source link

Module not found #67

Closed rhaebot closed 1 month ago

rhaebot commented 3 months ago

Astro Info

11:23:49 PM [vite] Pre-transform error: Failed to load url simple-stack-form (resolved id: simple-stack-form) in D:/Coding/Astro/RS/astro.config.mjs. Does the file exist?
11:23:49 PM [vite] Error when evaluating SSR module D:\Coding\Astro\RS\astro.config.mjs: failed to import "simple-stack-form"
|- Error: Cannot find module 'simple-stack-form' imported from 'D:/Coding/Astro/RS/astro.config.mjs'
    at nodeImport (file:///D:/Coding/Astro/RS/node_modules/.pnpm/vite@5.3.1/node_modules/vite/dist/node/chunks/dep-BcXSligG.js:53484:19)
    at ssrImport (file:///D:/Coding/Astro/RS/node_modules/.pnpm/vite@5.3.1/node_modules/vite/dist/node/chunks/dep-BcXSligG.js:53349:22)
    at eval (D:/Coding/Astro/RS/astro.config.mjs:6:37)
    at async instantiateModule (file:///D:/Coding/Astro/RS/node_modules/.pnpm/vite@5.3.1/node_modules/vite/dist/node/chunks/dep-BcXSligG.js:53408:5)

[astro] Unable to load your Astro config

Cannot find module 'simple-stack-form' imported from 'D:/Coding/Astro/RS/astro.config.mjs'
  Stack trace:
    at nodeImport (file:///D:/Coding/Astro/RS/node_modules/.pnpm/vite@5.3.1/node_modules/vite/dist/node/chunks/dep-BcXSligG.js:53484:19)
    at eval (D:/Coding/Astro/RS/astro.config.mjs:6:37)

If this issue only occurs in one browser, which browser is a problem?

No response

Describe the Bug

Can't find the module when attempting to import.

Error: image

Astro.config.mjs image

What's the expected result?

Expected to find the module. My node_modules folder is erroring on the tsconfig file in the simple-stack-form folder as it cannot find the base. I am using strict for my tsconfig. Not sure if this relevant.

Link to Minimal Reproducible Example

Could not reproduce - I have the latest version of Astro, Node, TS

Participation

bholmesdev commented 2 months ago

Hey @rhaebot! Thanks for reporting. It sounds like there are few issues going on here:

I unfortunately can't offer a solution without an example. First, can you share the console output when running npm run astro info in your terminal? Next, can you send a link to a minimal github repository showing the issue?

bholmesdev commented 1 month ago

@rhaebot closing due to the age of this issue. If you have more info to share (see above) I'm happy to reopen.