-
Notifications
You must be signed in to change notification settings - Fork 31
Open
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation
Description
Hello, and thanks for this awesome package !
So, I have been trying to use the libpg-query package inside a nextjs server environment to parse and validate some SQL queries, but I am getting the output
(Using Webpack)
pnpm run dev
failed to asynchronously prepare wasm: Error: ENOENT: no such file or directory, open 'C:\Petit p\densograph_2\citygraph\.next\server\vendor-chunks\libpg-query.wasm'
Aborted(Error: ENOENT: no such file or directory, open 'C:\Petit p\densograph_2\citygraph\.next\server\vendor-chunks\libpg-query.wasm')
GET /api/chat 405 in 3901ms
[RuntimeError: Aborted(Error: ENOENT: no such file or directory, open 'C:\Petit p\densograph_2\citygraph\.next\server\vendor-chunks\libpg-query.wasm'). Build with -sASSERTIONS for more info.]
⨯ unhandledRejection: [RuntimeError: Aborted(Error: ENOENT: no such file or directory, open 'C:\Petit p\densograph_2\citygraph\.next\server\vendor-chunks\libpg-query.wasm'). Build with -sASSERTIONS for more info.]
⨯ unhandledRejection: [RuntimeError: Aborted(Error: ENOENT: no such file or directory, open 'C:\Petit p\densograph_2\citygraph\.next\server\vendor-chunks\libpg-query.wasm'). Build with -sASSERTIONS for more info.]
○ Compiling /_not-found ...
So, I checked and it appears that the web assembly module is not being included in the build at .next\server\vendor-chunks\libpg-query.wasm.
Edit with additional informations
Running it with npm instead of pnpm, and using Turbopack instead of Webpack gives a distinct (but similar) error
(Using Turpopack)
npm run dev
failed to asynchronously prepare wasm: Error: ENOENT: no such file or directory, open 'C:\Petit p\densograph_2\citygraph\[project]\node_modules\libpg-query\wasm\libpg-query.js [app-route] (ecmascript)\libpg-query.wasm'
Aborted(Error: ENOENT: no such file or directory, open 'C:\Petit p\densograph_2\citygraph\[project]\node_modules\libpg-query\wasm\libpg-query.js [app-route] (ecmascript)\libpg-query.wasm')
GET /api/chat 405 in 2326ms
[RuntimeError: Aborted(Error: ENOENT: no such file or directory, open 'C:\Petit p\densograph_2\citygraph\[project]\node_modules\libpg-query\wasm\libpg-query.js [app-route] (ecmascript)\libpg-query.wasm'). Build with -sASSERTIONS for more info.]
⨯ unhandledRejection: [RuntimeError: Aborted(Error: ENOENT: no such file or directory, open 'C:\Petit p\densograph_2\citygraph\[project]\node_modules\libpg-query\wasm\libpg-query.js [app-route] (ecmascript)\libpg-query.wasm'). Build with -sASSERTIONS for more info.]
⨯ unhandledRejection: [RuntimeError: Aborted(Error: ENOENT: no such file or directory, open 'C:\Petit p\densograph_2\citygraph\[project]\node_modules\libpg-query\wasm\libpg-query.js [app-route] (ecmascript)\libpg-query.wasm'). Build with -sASSERTIONS for more info.]
My development environment is Windows, and Node 20
Hoping this problem can be solved pretty soon. Thanks in advance !
Xetera
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation