Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Astro 2.1.4 breaks build #48

Closed
leesei opened this issue Mar 21, 2023 · 3 comments
Closed

Astro 2.1.4 breaks build #48

leesei opened this issue Mar 21, 2023 · 3 comments

Comments

@leesei
Copy link

leesei commented Mar 21, 2023

@astrojs/react/client.js in node_modules/@astrojs/react/src/index.ts gets resolved to ./src/astrojs/react/client.js by tsconfig.json

 yarn build
yarn run v1.22.19
$ astro build && jampack ./dist
node:fs:600
  handleErrorFromBinding(ctx);
  ^

Error: ENOENT: no such file or directory, open '/home/leesei/blog/astro-paper/src/astrojs/react/client.js'
    at Object.openSync (node:fs:600:3)
    at Object.readFileSync (node:fs:468:35)
    at extractExportsData (file:///home/leesei/blog/astro-paper/node_modules/astro/node_modules/vite/dist/node/chunks/dep-79892de8.js:45100:31) {
  errno: -2,
  syscall: 'open',
  code: 'ENOENT',
  path: '/home/leesei/blog/astro-paper/src/astrojs/react/client.js'
}

Node.js v18.14.2
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

I tired adding two paths "@*": ["node_modules/@*", "./src/*"] according to https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping but then the theme's code fails.

@leesei
Copy link
Author

leesei commented Mar 21, 2023

The workaround is to yarn add astro@2.1.3 for now.

@leesei leesei changed the title Astro 3.1.4 breaks build Astro 2.1.4 breaks build Mar 21, 2023
@satnaing
Copy link
Owner

satnaing commented Mar 22, 2023

Hello @leesei
Thanks for opening this issue.

It seems to be the problem with the latest release, version 2.1.4, since v2.1.3 and others are working fine.
I'll try to search for potential solutions to resolve this problem.
If not found, might as well open an issue on Astro repo.

The best way to avoid this problem for now is to stick with astro@2.1.3 and not upgrade to astro@2.1.4.

@satnaing
Copy link
Owner

Fixed in #49

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants