tradingview / lightweight-charts

Performant financial charts built with HTML5 canvas
https://www.tradingview.com/lightweight-charts/
Apache License 2.0
9.14k stars 1.58k forks source link

No possibility to install as github dependency. Postinstall hook is missed. #1681

Closed mishelen closed 1 day ago

mishelen commented 3 weeks ago

I want to use v5 candidate version So for that I run

npm install https://github.com/tradingview/lightweight-charts/tree/v5-candidate

but I always fall into that

npm error code 1
npm error path /home/somewhere/node_modules/lightweight-charts
npm error command failed
npm error command sh -c npm run install-hooks
npm error > lightweight-charts@4.2.0 install-hooks
npm error > node scripts/githooks/install.js
npm error node:internal/modules/cjs/loader:1251
npm error   throw err;
npm error   ^
npm error
npm error Error: Cannot find module '/home/somewhere/node_modules/lightweight-charts/scripts/githooks/install.js'
npm error     at Module._resolveFilename (node:internal/modules/cjs/loader:1248:15)
npm error     at Module._load (node:internal/modules/cjs/loader:1074:27)
npm error     at TracingChannel.traceSync (node:diagnostics_channel:315:14)
npm error     at wrapModuleLoad (node:internal/modules/cjs/loader:217:24)
npm error     at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:166:5)
npm error     at node:internal/main/run_main_module:30:49 {
npm error   code: 'MODULE_NOT_FOUND',
npm error   requireStack: []
npm error }

tried node 20.3, 22.7 package is in the ESM (type: 'module')

whenb trying that:

npm install https://github.com/tradingview/lightweight-charts/tree/v5-candidate --ignore-scripts

I get almost empty package: readme, package.json and license. Are you going to publish v5 version as 5.rc.1 f.e.?

SlicedSilver commented 3 weeks ago

It's still too earlier for us to consider releasing a RC / @next version of the library on NPM for the v5 version. If you would like to use the v5 candidate then I would suggest following the building.md guide in the repo to build your own version of the library and then package it as a tar file to be used in your own project.