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

use Vite 6 #130

Merged
merged 2 commits into from
Dec 3, 2024
Merged

use Vite 6 #130

merged 2 commits into from
Dec 3, 2024

Conversation

brillout
Copy link
Owner

@brillout brillout commented Dec 2, 2024

Vite 6 has a regression around resolving the imports of npm packages.

Error:

~/code/telefunc/examples/authentication (brillout/vite-6|u=) pnpm run dev

> @ dev /home/rom/code/telefunc/examples/authentication
> npm run server


> server
> vite

  VITE v6.0.2  ready in 789 ms
  ➜  press h + enter to show help
Server running at http://localhost:3000
✘ [ERROR] No known conditions for "./stringify" specifier in "@brillout/json-serializer" package [plugin vite:dep-pre-bundle]

    ../../telefunc/dist/cjs/node/server/runTelefunc/serializeTelefunctionResult.js:4:28:
      4 │ const stringify_1 = require("@brillout/json-serializer/stringify");
        ╵                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  This error came from the "onResolve" callback registered here:

    ../../node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:1150:20:
      1150 │       let promise = setup({
           ╵                     ^

    at setup (file:///home/rom/code/telefunc/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]/node_modules/vite/dist/node/chunks/dep-A4nAWF7x.js:16602:13)
    at handlePlugins (/home/rom/code/telefunc/node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:1150:21)
    at buildOrContextImpl (/home/rom/code/telefunc/node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:873:5)
    at Object.buildOrContext (/home/rom/code/telefunc/node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:699:5)
    at /home/rom/code/telefunc/node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:2037:68
    at new Promise (<anonymous>)
    at Object.context (/home/rom/code/telefunc/node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:2037:27)
    at Object.context (/home/rom/code/telefunc/node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:1879:58)
    at prepareEsbuildOptimizerRun (file:///home/rom/code/telefunc/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]/node_modules/vite/dist/node/chunks/dep-A4nAWF7x.js:18794:33)

Reproduction steps:

git clone [email protected]:brillout/telefunc
cd telefunc/
git checkout brillout/vite-6
pnpm install
pnpm run build
cd examples/authentication/
pnpm run dev

Same as single line (copy & paste me):

git clone [email protected]:brillout/telefunc && cd telefunc/ && git checkout brillout/vite-6 && pnpm install && pnpm run build && cd examples/authentication/ && pnpm run dev

@brillout brillout merged commit cc12317 into main Dec 3, 2024
30 checks passed
@brillout brillout deleted the brillout/vite-6 branch December 3, 2024 10:14
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

Successfully merging this pull request may close these issues.

1 participant