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
Works with pnpm dev but fails in BUILD mode waku build - this file is only imported into a server action and there is no difference if there is an additional 'use server' on top.
pnpm build
> waku-example@0.1.0 build /waku/examples/xx_auth
> waku build
vite v5.1.5 building SSR bundle for production...
src/func.ts (1:0) Error when using sourcemap for reporting an error: Can't resolve original location of error.
src/lib/db-lowdb.ts (1:0) Error when using sourcemap for reporting an error: Can't resolve original location of error.
✓ 71 modules transformed.
x Build failed in 341ms
/waku/node_modules/.pnpm/esbuild@0.19.12/node_modules/esbuild/lib/main.js:1651
let error = new Error(text);
^
Error: [vite:esbuild-transpile] Transform failed with 2 errors:
assets/func-!~{005}~.js:571:16: ERROR: Top-level await is not available in the configured target environment ("chrome87", "edge88", "es2020", "firefox78", "safari14" + 2 overrides)
assets/func-!~{005}~.js:572:19: ERROR: Top-level await is not available in the configured target environment ("chrome87", "edge88", "es2020", "firefox78", "safari14" + 2 overrides)
Top-level await is not available in the configured target environment ("chrome87", "edge88", "es2020", "firefox78", "safari14" + 2 overrides)
569| }
570|
571| const dbUsers = await JSONFilePreset("users.json", []);
| ^
572| const dbSessions = await JSONFilePreset("sessions.json", []);
573|
Top-level await is not available in the configured target environment ("chrome87", "edge88", "es2020", "firefox78", "safari14" + 2 overrides)
570|
571| const dbUsers = await JSONFilePreset("users.json", []);
572| const dbSessions = await JSONFilePreset("sessions.json", []);
| ^
573|
574| const adapter = new S(dbSessions, dbUsers);
at failureErrorWithLog (/waku/node_modules/.pnpm/esbuild@0.19.12/node_modules/esbuild/lib/main.js:1651:15)
at /waku/node_modules/.pnpm/esbuild@0.19.12/node_modules/esbuild/lib/main.js:849:29
at responseCallbacks.<computed> (/waku/node_modules/.pnpm/esbuild@0.19.12/node_modules/esbuild/lib/main.js:704:9)
at handleIncomingPacket (/waku/node_modules/.pnpm/esbuild@0.19.12/node_modules/esbuild/lib/main.js:764:9)
at Socket.readFromStdout (/waku/node_modules/.pnpm/esbuild@0.19.12/node_modules/esbuild/lib/main.js:680:7)
at Socket.emit (node:events:519:28)
at addChunk (node:internal/streams/readable:559:12)
at readableAddChunkPushByteMode (node:internal/streams/readable:510:3)
at Readable.push (node:internal/streams/readable:390:5)
at Pipe.onStreamRead (node:internal/stream_base_commons:190:23) {
errors: [Getter/Setter],
warnings: [Getter/Setter],
frame: '\n' +
'\x1B[33mTop-level await is not available in the configured target environment ("chrome87", "edge88", "es2020", "firefox78", "safari14" + 2 overrides)\x1B[39m\n' +
'569| }\n' +
'570| \n' +
'571| const dbUsers = await JSONFilePreset("users.json", []);\n' +
' | ^\n' +
'572| const dbSessions = await JSONFilePreset("sessions.json", []);\n' +
'573| \n' +
'\n' +
'\x1B[33mTop-level await is not available in the configured target environment ("chrome87", "edge88", "es2020", "firefox78", "safari14" + 2 overrides)\x1B[39m\n' +
'570| \n' +
'571| const dbUsers = await JSONFilePreset("users.json", []);\n' +
'572| const dbSessions = await JSONFilePreset("sessions.json", []);\n' +
' | ^\n' +
'573| \n' +
'574| const adapter = new S(dbSessions, dbUsers);\n',
loc: {
column: 16,
file: 'assets/func-!~{005}~.js',
length: 5,
line: 571,
lineText: 'const dbUsers = await JSONFilePreset("users.json", []);',
namespace: '',
suggestion: ''
},
code: 'PLUGIN_ERROR',
plugin: 'vite:esbuild-transpile',
hook: 'renderChunk'
}
Node.js v21.7.0
The text was updated successfully, but these errors were encountered:
WAKU Commit (Main): f985f59
Works with
pnpm dev
but fails in BUILD modewaku build
- this file is only imported into a server action and there is no difference if there is an additional'use server'
on top.The text was updated successfully, but these errors were encountered: