You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
❯ yarn astro info
yarn run v1.22.19
warning package.json: No license field
warning ../package.json: No license field
$ astro info
Cannot find package 'typescript' imported from /Users/steve/version-control/colloquial/marketing/node_modules/zod-to-ts/dist/index.js
Stack trace:
at packageResolve (node:internal/modules/esm/resolve:854:9)
at defaultResolve (node:internal/modules/esm/resolve:1169:11)
at ModuleLoader.resolve (node:internal/modules/esm/loader:510:25)
at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:96:40)
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
Bootstrapping an Astro project with the yarn create astro command and selecting 'No' to Typescript causes an error and the dev server fails to start.
❯ yarn create astro
yarn create v1.22.19
warning package.json: No license field
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
[3/4] 🔗 Linking dependencies...
[4/4] 🔨 Building fresh packages...
success Installed "[email protected]" with binaries:
- create-astro
[##########################] 26/26
astro Launch sequence initiated.
dir Where should we create your new project?
.
tmpl How would you like to start your new project?
Include sample files
ts Do you plan to write TypeScript?
No
◼ No worries! TypeScript is supported in Astro by default,
but you are free to continue writing JavaScript instead.
deps Install dependencies?
Yes
◼ Nice! Git has already been initialized
✔ Project initialized!
■ Template copied
■ Dependencies installed
next Liftoff confirmed. Explore your project!
Run yarn dev to start the dev server. CTRL+C to stop.
Add frameworks like react or tailwind using astro add.
Stuck? Join us at https://astro.build/chat
╭─────╮ Houston:
│ ◠ ◡ ◠ Good luck out there, astronaut! 🚀
╰──🍫─╯
✨ Done in 52.63s.
❯ yarn dev
yarn run v1.22.19
warning package.json: No license field
warning ../package.json: No license field
$ astro dev
Cannot find package 'typescript' imported from /Users/steve/version-control/colloquial/marketing/node_modules/zod-to-ts/dist/index.js
Stack trace:
at packageResolve (node:internal/modules/esm/resolve:854:9)
at defaultResolve (node:internal/modules/esm/resolve:1169:11)
at ModuleLoader.resolve (node:internal/modules/esm/loader:510:25)
at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:96:40)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
What's the expected result?
The server starts normally.
Link to Minimal Reproducible Example
Not possible.
Participation
I am willing to submit a pull request for this issue.
The text was updated successfully, but these errors were encountered:
We may have to investigate this again as I remember @Princesseuh brought up that zod-to-ts has a peer dependency on typescript, so technically every Astro project needs to have typescript installed.
It's not a problem for npm or pnpm I believe since they're able to auto install that for you, but I'm not sure about yarn, which the repro shows.
Yes, we originally decided it was OK to add it, because we already had a transitive peer dep via tsconfck. However it seems that peerdep is optional, so I think perhaps we do need to handle this case.
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
Bootstrapping an Astro project with the
yarn create astro
command and selecting 'No' to Typescript causes an error and the dev server fails to start.What's the expected result?
The server starts normally.
Link to Minimal Reproducible Example
Not possible.
Participation
The text was updated successfully, but these errors were encountered: