PRQL / prql

PRQL is a modern language for transforming data — a simple, powerful, pipelined SQL replacement
https://prql-lang.org
Apache License 2.0
9.92k stars 217 forks source link

Can't build Playground - `sh -c npm run build` fails #4974

Open richb-hanover opened 1 week ago

richb-hanover commented 1 week ago

What happened?

Attempting to build Playground on M2 Mac in the Dev Container. Commit is 86becc59

When I run task web:run-playground I see the error below.

What other diagnostic info could I provide? Thanks.

PRQL input

N/A

SQL output

N/A

Expected SQL output

N/A

MVCE confirmation

Anything else?

vscode ➜ /workspaces/prql (main) $ task web:run-playground
task: [web:build-playground-dependencies] npm ci
npm error code 1
npm error path /workspaces/prql/prqlc/bindings/js
npm error command failed
npm error command sh -c npm run build
npm error > prqlc@0.13.3 build
npm error > npm run build:node && npm run build:web && npm run build:bundler
npm error
npm error
npm error > prqlc@0.13.3 build:node
npm error > npx cross-env wasm-pack build --target nodejs --out-dir dist/node --${PROFILE} && rm dist/node/.gitignore
npm error node:events:497
npm error       throw er; // Unhandled 'error' event
npm error       ^
npm error
npm error Error: spawn wasm-pack ENOENT
npm error     at ChildProcess._handle.onexit (node:internal/child_process:286:19)
npm error     at onErrorNT (node:internal/child_process:484:16)
npm error     at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
npm error Emitted 'error' event on ChildProcess instance at:
npm error     at ChildProcess._handle.onexit (node:internal/child_process:292:12)
npm error     at onErrorNT (node:internal/child_process:484:16)
npm error     at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
npm error   errno: -2,
npm error   code: 'ENOENT',
npm error   syscall: 'spawn wasm-pack',
npm error   path: 'wasm-pack',
npm error   spawnargs: [ 'build', '--target', 'nodejs', '--out-dir', 'dist/node', '--dev' ]
npm error }
npm error
npm error Node.js v20.18.0
npm error A complete log of this run can be found in: /home/vscode/.npm/_logs/2024-10-19T22_57_39_755Z-debug-0.log
task: Failed to run task "web:run-playground": exit status 1
vscode ➜ /workspaces/prql (main) $ 
max-sixty commented 1 week ago

Interesting, I haven't seen this before. Does the full log at /home/vscode/.npm/_logs/2024-10-19T22_57_39_755Z-debug-0.log have anything interesting?

Does running whatever inner command is run based on spawnargs: [ 'build', '--target', 'nodejs', '--out-dir', 'dist/node', '--dev' ] show anything?

richb-hanover commented 1 week ago

Here's where it stops:

(Again, I apologize that I don't know much about the node compilation environment for prqlc. I'm happy to provide more info as needed...)

vscode ➜ .../prql/prqlc/bindings/js (freeze-at-86becc59) $ cd /workspaces/prql/prqlc/bindings/js

vscode ➜ .../prql/prqlc/bindings/js (freeze-at-86becc59) $ npm run build:node

> prqlc@0.13.3 build:node
> npx cross-env wasm-pack build --target nodejs --out-dir dist/node --${PROFILE} && rm dist/node/.gitignore

node:events:497
      throw er; // Unhandled 'error' event
      ^

Error: spawn wasm-pack ENOENT
    at ChildProcess._handle.onexit (node:internal/child_process:286:19)
    at onErrorNT (node:internal/child_process:484:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
Emitted 'error' event on ChildProcess instance at:
    at ChildProcess._handle.onexit (node:internal/child_process:292:12)
    at onErrorNT (node:internal/child_process:484:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'spawn wasm-pack',
  path: 'wasm-pack',
  spawnargs: [ 'build', '--target', 'nodejs', '--out-dir', 'dist/node', '--' ]
}

Node.js v20.18.0
vscode ➜ .../prql/prqlc/bindings/js (freeze-at-86becc59) $