简体   繁体   中英

NPM install with git clone resulting in error

I'm trying to build from source from a git clone rather than doing npm install package-name . This is the syntax I'm using: git clone package-name && cd package-name && npm i But I get some error shown below.

$ git clone https://github.com/tradingview/lightweight-charts.git && cd lightweight-charts && npm i
Cloning into 'lightweight-charts'...
remote: Enumerating objects: 21225, done.
remote: Counting objects: 100% (230/230), done.
remote: Compressing objects: 100% (167/167), done.
remote: Total 21225 (delta 166), reused 102 (delta 60), pack-reused 20995
Receiving objects: 100% (21225/21225), 13.90 MiB | 448.00 KiB/s, done.
Resolving deltas: 100% (16144/16144), done.
npm ERR! code EBADENGINE
npm ERR! engine Unsupported engine
npm ERR! engine Not compatible with your version of node/npm: eslint-plugin-jsdoc@37.9.7
npm ERR! notsup Not compatible with your version of node/npm: eslint-plugin-jsdoc@37.9.7
npm ERR! notsup Required: {"node":"^12 || ^14 || ^16 || ^17"}
npm ERR! notsup Actual:   {"npm":"8.5.5","node":"v18.3.0"}

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

$ node --version v18.3.0 I should have the node version required ^17

running npm install lightweight-charts works no problem but I don't get the latest git commits.

I forced the downgrade to $ sudo npm install -g node@17.0.0 --force

$ node -v
v17.0.0
$ cd lightweight-charts/
$ npm run build

> lightweight-charts@4.0.0 build
> npm-run-all tsc rollup bundle-dts

sh: line 1: npm-run-all: command not found
$ npm install npm-run-all
npm WARN deprecated tslint@6.1.3: TSLint has been deprecated in favor of ESLint. Please see https://github.com/palantir/tslint/issues/4534 for more information.

added 657 packages, and audited 658 packages in 1m

148 packages are looking for funding
  run `npm fund` for details

5 high severity vulnerabilities

To address issues that do not require attention, run:
  npm audit fix

To address all issues (including breaking changes), run:
  npm audit fix --force

Run `npm audit` for details.

$ npm run build

> lightweight-charts@4.0.0 build
> npm-run-all tsc rollup bundle-dts


> lightweight-charts@4.0.0 tsc
> ttsc -p tsconfig.prod.json


> lightweight-charts@4.0.0 rollup
> rollup -c rollup.config.js

Building version: 4.0.0-dev+202206211052

./lib/prod/src/index.js → ./dist/lightweight-charts.esm.development.js...
created ./dist/lightweight-charts.esm.development.js in 608ms

./lib/prod/src/standalone.js → ./dist/lightweight-charts.standalone.development.js...
created ./dist/lightweight-charts.standalone.development.js in 474ms

> lightweight-charts@4.0.0 bundle-dts
> tsc --noEmit --allowJs dts-config.js && dts-bundle-generator --config dts-config.js

Compiling input files...
Processing lib/prod/src/index.d.ts
Writing lib/prod/src/index.d.ts -> dist/typings.d.ts
Checking generated files...
Done in 1.65s

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM