evidence-dev / template

Starter template for new Evidence Projects
https://docs.evidence.dev
19 stars 15 forks source link

Error with npm install with latest versions #143

Open KostasKgr opened 3 weeks ago

KostasKgr commented 3 weeks ago

Hello all,

I am having a problem running the template with the commits of the last month.

With latest version i get this state:

❯ npm install
npm error code 243
npm error path /home/kkollias/projects/notable/slack_profiles/evidence/node_modules/@evidence-dev/sdk
npm error command failed
npm error command sh -c npm run build

npm error A complete log of this run can be found in: ....
❯ ls -a node_modules/
 ./   ../   .bin/  '@evidence-dev'/

And part of the detailed output:

...
116 info run duckdb@0.10.2 install { code: 0, signal: null }
117 info run sqlite3@5.1.5 install { code: 0, signal: null }
118 info run @evidence-dev/sdk@1.3.0 postinstall node_modules/@evidence-dev/sdk npm run build
119 info run @sveltejs/kit@2.5.4 postinstall node_modules/@sveltejs/kit node postinstall.js
120 info run esbuild@0.20.2 postinstall node_modules/esbuild node install.js
121 info run svelte-preprocess@5.1.3 postinstall node_modules/svelte-preprocess echo "[svelte-preprocess] Don't forget to install the preprocessors packages that will be used: sass, stylus, less, postcss & postcss-load-config, coffeescript, pug, etc..."
122 info run svelte-preprocess@5.1.3 postinstall { code: 0, signal: null }
123 info run esbuild@0.20.2 postinstall { code: 0, signal: null }
124 info run @evidence-dev/sdk@1.3.0 postinstall { code: 243, signal: null }
125 info run @sveltejs/kit@2.5.4 postinstall { code: 1, signal: null }
126 verbose stack Error: command failed
126 verbose stack     at ChildProcess.<anonymous> (/snap/node/8723/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/lib/index.js:53:27)
126 verbose stack     at ChildProcess.emit (node:events:519:28)
126 verbose stack     at maybeClose (node:internal/child_process:1105:16)
126 verbose stack     at ChildProcess._handle.onexit (node:internal/child_process:305:5)
127 verbose pkgid @evidence-dev/sdk@1.3.0
128 verbose cwd /home/kkollias/projects/notable/slack_profiles/evidence
129 verbose Linux 6.5.0-35-generic
130 verbose node v20.14.0
131 verbose npm  v10.7.0
132 error code 243
133 error path ..../evidence/node_modules/@evidence-dev/sdk
134 error command failed
135 error command sh -c npm run build
136 verbose exit 243
137 verbose code 243
138 silly unfinished npm timer reify 1718352132284
139 silly unfinished npm timer reify:build 1718352139159
140 silly unfinished npm timer build 1718352139161
141 silly unfinished npm timer build:deps 1718352139162
142 silly unfinished npm timer build:run:postinstall 1718352140307
143 silly unfinished npm timer build:run:postinstall:node_modules/@evidence-dev/sdk 1718352140307
144 silly unfinished npm timer build:run:postinstall:node_modules/@sveltejs/kit 1718352140335

With some earlier versions i was still getting errors, resulting in a similarly mostly empty node modules folder, for example:

❯ git checkout 9d9d153c9eda9268eda8d258a2bcf07854363d5b
Previous HEAD position was 8dea86e Release 32.0.0 (#125)
HEAD is now at 9d9d153 Merge pull request #120 from evidence-dev/mar22-release

❯ npm install
npm error code 1
npm error path /home/kkollias/projects/notable/slack_profiles/my-project3/node_modules/lz4
npm error command failed
npm error command sh -c node-gyp rebuild

npm error A complete log of this run can be found in: 

This version worked, but i didnt try every single commit going backwards:

❯ git checkout d44760d29e6b9c398dbe970dd7c43728358f9fdf
Previous HEAD position was 9d9d153 Merge pull request #120 from evidence-dev/mar22-release
HEAD is now at d44760d Merge pull request #117 from evidence-dev/upgrade-29.02

❯ npm install

added 1099 packages in 16s

Since i cant find anyone having reported something similar, perhaps there some dependency on newer npm or node?

Thanks

vladiliescu commented 2 weeks ago

Happening to me as well. Quick repro:

npx degit evidence-dev/template dashboard
cd dashboard
npm install
npm run sources
npm run build

Results in this error:

node:internal/event_target:1090
  process.nextTick(() => { throw err; });
                           ^
ReferenceError [Error]: window is not defined
    at detect (/Users/.../dashboard/node_modules/echarts/dist/echarts.js:123:54)
...
vladiliescu commented 2 weeks ago

@KostasKgr they only support node@18 & @20 -- https://docs.evidence.dev/guides/system-requirements/