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

Error when building #9

Open
grctest opened this issue Sep 18, 2023 · 1 comment
Open

Error when building #9

grctest opened this issue Sep 18, 2023 · 1 comment

Comments

@grctest
Copy link

grctest commented Sep 18, 2023

bun build ./src/index.tsx --outdir=dist

error: No matching export in "node:path" for import "resolve"
import { resolve, resolve as resolveFn, join } from 'path';         ^
/node_modules/@elysiajs/static/dist/index.js:2:10 54

error: No matching export in "node:path" for import "resolve"
import { resolve, resolve as resolveFn, join } from 'path';                  ^
/node_modules/@elysiajs/static/dist/index.js:2:19 63

error: No matching export in "node:path" for import "join"
import { resolve, resolve as resolveFn, join } from 'path';                                        ^
/node_modules/@elysiajs/static/dist/index.js:2:41 85

error: script "build" exited with code 1 (SIGHUP)

Likely related to the following bun issue:
oven-sh/bun#5095

@heacsing
Copy link

heacsing commented Nov 14, 2023

Thanks to your related information, I move the destructuring assignment to below and it works.

import path from path;
const { resolve, join } = path;
const resolveFn = resolve;

It's a practical solution before bun handle with that issue.

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