我正在尝试在本地环境中开发 redash 开源。
我遇到了 npm ERR!代码 ELIFECYCLE npm 错误!错误号 2 ... 而npm run build
操作系统:WSL2 Ubuntu 18.04 LTS
重划线:v9.0.0 beta ( git clone https://github.com/getredash/redash.git
)
我之前安装的:
node: 14.17.2
npm: 6.14.13
typeScript: 4.3.5 // sudo npm install -g typescript
Python: 3.6.9
node-gyp: 8.1.0
npm run build
成功运行后出现错误npm install
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @redash/viz@1.0.0 build:babel:base: `babel src --out-dir lib --source-maps --ignore 'src/**/*.test.js' --copy-files --no-copy-ignored --extensions .ts,.tsx,.js,.jsx`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @redash/viz@1.0.0 build:babel:base script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/kyunghwan/.npm/_logs/2021-07-28T23_58_03_888Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @redash/viz@1.0.0 build:babel: `npm run type-gen && npm run build:babel:base`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @redash/viz@1.0.0 build:babel script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/kyunghwan/.npm/_logs/2021-07-28T23_58_03_932Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! redash-client@9.0.0-beta build:viz: `(cd viz-lib && npm run build:babel)`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the redash-client@9.0.0-beta build:viz script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/kyunghwan/.npm/_logs/2021-07-28T23_58_03_972Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! redash-client@9.0.0-beta build: `npm run clean && npm run build:viz && NODE_ENV=production webpack`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the redash-client@9.0.0-beta build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/kyunghwan/.npm/_logs/2021-07-28T23_58_04_017Z-debug.log
过去,我发现了一个具有相同错误的问题,但不幸的是它对我的情况没有多大帮助。
其实运行npm run start
命令打开localhost:8080是没有问题的。但我想知道为什么会发生此错误以及如何解决此错误。
我想这要么是重冲版本问题,要么是 npm 版本问题,要么是 WSL 的限制。
请建议。
谢谢!