首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用git克隆安装NPM会导致错误

使用git克隆安装NPM会导致错误
EN

Stack Overflow用户
提问于 2022-06-21 10:31:36
回答 1查看 200关注 0票数 -2

我试图从git克隆的源代码构建,而不是执行npm install package-name。这是我使用的语法:git clone package-name && cd package-name && npm i,但下面显示了一些错误。

代码语言:javascript
复制
$ 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应该有所需的节点版本^17

运行npm install lightweight-charts没有问题,但我没有得到最新的git提交。

EN

回答 1

Stack Overflow用户

发布于 2022-06-21 10:57:47

我强迫降级为$ sudo npm install -g node@17.0.0 --force

代码语言:javascript
复制
$ 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
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/72699228

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档