[英]NPM install with git clone resulting in error
我正在嘗試從 git clone 的源代碼構建,而不是執行npm install package-name
。 這是我正在使用的語法: git clone package-name && cd package-name && npm i
但我得到一些錯誤,如下所示。
$ 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
我應該有所需的節點版本^17
運行npm install lightweight-charts
沒有問題,但我沒有得到最新的 git 提交。
我強制降級為$ 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
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.