evidence-dev / evidence

Business intelligence as code: build fast, interactive data visualizations in pure SQL and markdown
https://evidence.dev
MIT License
4.47k stars 215 forks source link

[Bug]: Node 18 - TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined #2802

Closed archiewood closed 3 days ago

archiewood commented 6 days ago

Describe the bug

Node 18 breaks on npm run dev and fails to load the Evidence server

Steps to Reproduce

use evidence with node 18

Logs

Failed to build pages manifest with error:  TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
    at new NodeError (node:internal/errors:399:5)
    at validateString (node:internal/validators:163:11)
    at Object.join (node:path:1172:7)
    at GET (/Users/archie/Projects/repro-codespaces-error/.evidence/template/src/pages/api/pagesManifest.json/+server.js:78:57)
    at async Module.render_endpoint (/Users/archie/Projects/repro-codespaces-error/node_modules/@sveltejs/kit/src/runtime/server/endpoint.js:49:18)
    at async resolve (/Users/archie/Projects/repro-codespaces-error/node_modules/@sveltejs/kit/src/runtime/server/respond.js:454:17)
    at async Module.respond (/Users/archie/Projects/repro-codespaces-error/node_modules/@sveltejs/kit/src/runtime/server/respond.js:330:20)
    at async file:///Users/archie/Projects/repro-codespaces-error/node_modules/@sveltejs/kit/src/exports/vite/dev/index.js:524:22 {
  code: 'ERR_INVALID_ARG_TYPE'
}

Severity

blocking all usage of Evidence

Env

~/Projects/repro-codespaces-error$ npx envinfo --system --binaries

  System:
    OS: macOS 14.2.1
    CPU: (10) arm64 Apple M1 Pro
    Memory: 81.30 MB / 16.00 GB
    Shell: 5.1.16 - /opt/homebrew/bin/bash
  Binaries:
    Node: 18.16.0 - ~/.nvm/versions/node/v18.16.0/bin/node
    Yarn: 1.22.19 - ~/.nvm/versions/node/v18.16.0/bin/yarn
    npm: 9.5.1 - ~/.nvm/versions/node/v18.16.0/bin/npm
    pnpm: 8.6.9 - /opt/homebrew/bin/pnpm
    bun: 1.0.25 - /opt/homebrew/bin/bun

Additional Information, or Workarounds

No response