Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

依赖安装问题,npm指令用不了 nodejs的依赖没法加 #1803

Closed
sanxianla opened this issue Feb 9, 2023 · 35 comments
Closed

依赖安装问题,npm指令用不了 nodejs的依赖没法加 #1803

sanxianla opened this issue Feb 9, 2023 · 35 comments

Comments

@sanxianla
Copy link

Qinglong version

2.10.13

Steps to reproduce

开始安装依赖 png-js,开始时间 2023/2/9 下午6:44:32

/bin/bash: npm: command not found

依赖安装失败,结束时间 2023/2/9 下午6:44:32,耗时 0.049 秒

What is expected?

怎么能解决这个指令未找到问题

What is actually happening?

添加依赖界面

System Info

No response

Any additional comments?

No response

@whyour
Copy link
Owner

whyour commented Feb 9, 2023

@sanxianla 升级最新版

@sanxianla
Copy link
Author

@sanxianla 升级最新版

这个是今天重装docker之后从头拉的latest版的青龙面板,是换别的版本吗 我查了一下好像是我nodejs版本和npm版本不对应的原因 但是找不到合适的解决方案
root@aml-s812:# node -v
v10.24.0
root@aml-s812:# npm -v
ERROR: npm is known not to run on Node.js v10.24.0
You'll need to upgrade to a newer Node.js version in order to use this
version of npm. You can find the latest version at https://nodejs.org/
root@aml-s812:# sudo apt install nodejs npm -y
Reading package lists... Done
Building dependency tree
Reading state information... Done
npm is already the newest version (5.8.0+ds6-4+deb10u2).
nodejs is already the newest version (10.24.0dfsg-1deb10u2).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@aml-s812:# npm -v
ERROR: npm is known not to run on Node.js v10.24.0
You'll need to upgrade to a newer Node.js version in order to use this
version of npm. You can find the latest version at https://nodejs.org/

@whyour
Copy link
Owner

whyour commented Feb 9, 2023

@sanxianla 升级最新版

这个是今天重装docker之后从头拉的latest版的青龙面板,是换别的版本吗 我查了一下好像是我nodejs版本和npm版本不对应的原因 但是找不到合适的解决方案 root@aml-s812:# node -v v10.24.0 root@aml-s812:# npm -v ERROR: npm is known not to run on Node.js v10.24.0 You'll need to upgrade to a newer Node.js version in order to use this version of npm. You can find the latest version at https://nodejs.org/ root@aml-s812:# sudo apt install nodejs npm -y Reading package lists... Done Building dependency tree Reading state information... Done npm is already the newest version (5.8.0+ds6-4+deb10u2). nodejs is already the newest version (10.24.0dfsg-1deb10u2). 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. root@aml-s812:# npm -v ERROR: npm is known not to run on Node.js v10.24.0 You'll need to upgrade to a newer Node.js version in order to use this version of npm. You can find the latest version at https://nodejs.org/

你这docker源有问题吧

@sanxianla
Copy link
Author

sanxianla commented Feb 9, 2023 via email

@whyour
Copy link
Owner

whyour commented Feb 9, 2023

@sanxianla 要先看镜像的创建时间是不是和 dockerhub 上的一致,不一致说明源有问题

@sanxianla
Copy link
Author

@sanxianla 要先看镜像的创建时间是不是和 dockerhub 上的一致,不一致说明源有问题

`root@qinglong:/ql $ ql check
Error: Cannot find module 'reflect-metadata'
Require stack:

  • /ql/back/token.ts
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.Module._resolveFilename.sharedData.moduleResolveFilenameHook.installedValue [as _resolveFilename] (/usr/local/pnpm-global/5/node_modules/.pnpm/@cspotcode+source-map-support@0.7.0/node_modules/@cspotcode/source-map-support/source-map-support.js:679:30)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object. (/ql/back/token.ts:1:1)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Module.m._compile (/usr/local/pnpm-global/5/node_modules/.pnpm/ts-node@10.4.0_typescript@4.5.4/node_modules/ts-node/src/index.ts:1371:23)
    at Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Object.require.extensions. [as .ts] (/usr/local/pnpm-global/5/node_modules/.pnpm/ts-node@10.4.0_typescript@4.5.4/node_modules/ts-node/src/index.ts:1374:12) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [ '/ql/back/token.ts' ]
    }

`
现在打开是pm2 logs panel
暂无日志
运行ql check报错提示这些之后就卡主不动 这是在自动安装依赖吗?

@whyour
Copy link
Owner

whyour commented Feb 9, 2023

@sanxianla 最新镜像吗

@sanxianla
Copy link
Author

sanxianla commented Feb 9, 2023 via email

@whyour
Copy link
Owner

whyour commented Feb 9, 2023

@sanxianla 拉latest也不一定是最新的,看你镜像创建时间是否一致。或者容器内 env 看青龙版本

@sanxianla
Copy link
Author

sanxianla commented Feb 9, 2023 via email

@whyour
Copy link
Owner

whyour commented Feb 9, 2023

@sanxianla 新建的容器环境就有问题?

@sanxianla
Copy link
Author

sanxianla commented Feb 9, 2023 via email

@whyour
Copy link
Owner

whyour commented Feb 9, 2023

@sanxianla 支持的,你用develop镜像试一下,过几天就是正式版了

@whyour
Copy link
Owner

whyour commented Feb 9, 2023

@sanxianla
Copy link
Author

sanxianla commented Feb 9, 2023 via email

@sanxianla
Copy link
Author

sanxianla commented Feb 9, 2023 via email

@whyour
Copy link
Owner

whyour commented Feb 9, 2023

@sanxianla 捉你起来了吗,刚开始你执行 check 干啥

@whyour
Copy link
Owner

whyour commented Feb 9, 2023

@sanxianla 面板起来了吗

@sanxianla
Copy link
Author

装好之后打开的样子就是pm2 logs panel
暂无日志这样
这是地址
d.justdns.tk:5700

@whyour
Copy link
Owner

whyour commented Feb 9, 2023

@sanxianla 这是dev部署的?进容器看panel有日志吗

@sanxianla
Copy link
Author

docker拉的
docker run -dit
-v $PWD/ql/data:/ql/data
-p 5700:5700
--name qinglong
--hostname qinglong
--restart unless-stopped
whyour/qinglong:develop

进入容器后怎么查看日志呢

@whyour
Copy link
Owner

whyour commented Feb 9, 2023

@sanxianla pm2 logs panel

@sanxianla
Copy link
Author

@sanxianla pm2 logs panel

root@qinglong:/ql $ pm2 logs panel

Fatal error in , line 0

unreachable code

#FailureMessage Object: 0xbe82b23c
Trace/breakpoint trap (core dumped)

@whyour
Copy link
Owner

whyour commented Feb 9, 2023

@sanxianla 置顶的 issue 不就是你的问题? #897

@sanxianla
Copy link
Author

wo靠 照着模样下载了一下这个东西竟然真的打开了http://ftp.debian.org/debian/pool/main/libs/libseccomp/
然后现在就是依赖安装问题了
开始安装依赖 ts-md5,开始时间 2023-02-09 23:12:40

Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
ERROR: No matching distribution found for ts-md5

[notice] A new release of pip available: 22.3.1 -> 23.0
[notice] To update, run: pip install --upgrade pip

依赖安装失败,结束时间 2023-02-09 23:12:44,耗时 3 秒
基本上python依赖都是报错这个 运行pip install --upgrade pip之后重新安装还是这个提示报错

@sanxianla
Copy link
Author

感谢感谢!!!!

@sanxianla sanxianla reopened this Feb 9, 2023
@whyour
Copy link
Owner

whyour commented Feb 10, 2023

wo靠 照着模样下载了一下这个东西竟然真的打开了http://ftp.debian.org/debian/pool/main/libs/libseccomp/ 然后现在就是依赖安装问题了 开始安装依赖 ts-md5,开始时间 2023-02-09 23:12:40

Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple ERROR: No matching distribution found for ts-md5

[notice] A new release of pip available: 22.3.1 -> 23.0 [notice] To update, run: pip install --upgrade pip

依赖安装失败,结束时间 2023-02-09 23:12:44,耗时 3 秒 基本上python依赖都是报错这个 运行pip install --upgrade pip之后重新安装还是这个提示报错

你不看看 md5 是什么类型的依赖,谁让你在 python 依赖装的找谁

@whyour whyour closed this as completed Feb 10, 2023
@sanxianla
Copy link
Author

今天又遇到了一大堆无法理解的问题,刚开始是在拉库的时候无法拉库,之后稀里糊涂拉完就经常面板打不开,进行ql -l check的时候老是提示npm install失败,之后一直报错下面信息,module老是无法安装上

开始执行... 2023-02-10 10:56:08

🔔摇京豆, 开始!

====================共3个京东账号Cookie=========

==================脚本执行- 北京时间(UTC+8):2/10/2023, 10:56:12=====================

faker 友情提示:您的脚本正常运行中,频道:https://t.me/scriptalking
node:internal/modules/cjs/loader:995
const err = new Error(message);
^

Error: Cannot find module '@sindresorhus/is'
Require stack:

  • /ql/data/scripts/node_modules/.pnpm/registry.npmmirror.com+got@11.8.5/node_modules/got/dist/source/create.js
  • /ql/data/scripts/node_modules/.pnpm/registry.npmmirror.com+got@11.8.5/node_modules/got/dist/source/index.js
  • /ql/data/scripts/shufflewzc_faker3_main/jd_club_lottery.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:995:15)
    at Module._load (node:internal/modules/cjs/loader:841:27)
    at Module.require (node:internal/modules/cjs/loader:1061:19)
    at require (node:internal/modules/cjs/helpers:103:18)
    at Object. (/ql/data/scripts/node_modules/.pnpm/registry.npmmirror.com+got@11.8.5/node_modules/got/dist/source/create.js:14:14)
    at Module._compile (node:internal/modules/cjs/loader:1159:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
    at Module.load (node:internal/modules/cjs/loader:1037:32)
    at Module._load (node:internal/modules/cjs/loader:878:12)
    at Module.require (node:internal/modules/cjs/loader:1061:19) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [
    '/ql/data/scripts/node_modules/.pnpm/registry.npmmirror.com+got@11.8.5/node_modules/got/dist/source/create.js',
    '/ql/data/scripts/node_modules/.pnpm/registry.npmmirror.com+got@11.8.5/node_modules/got/dist/source/index.js',
    '/ql/data/scripts/shufflewzc_faker3_main/jd_club_lottery.js'
    ]
    }

Node.js v18.12.1

执行结束... 2023-02-10 10:56:12 耗时 4 秒     

@whyour
Copy link
Owner

whyour commented Feb 10, 2023

@sanxianla 脚本问题找脚本开发者

@sanxianla
Copy link
Author

sanxianla commented Feb 10, 2023

是因为这一类的依赖安装问题 进入青龙内部运行npm install老是卡死
root@qinglong:/ql $ npm install
(⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂) ⠦ idealTree:ql: sill idealTree buildDeps

@whyour
Copy link
Owner

whyour commented Feb 10, 2023

@sanxianla 依赖在依赖管理啊,谁让你进内部运行的

@sanxianla
Copy link
Author

sanxianla commented Feb 10, 2023

依赖管理里面全是安装失败
开始安装依赖 @sindresorhus/is,开始时间 2023-02-10 11:01:45

依赖安装失败,结束时间 2023-02-10 11:01:45,耗时 0 秒

日志 - png-js
开始安装依赖 png-js,开始时间 2023-02-10 11:05:55

依赖安装失败,结束时间 2023-02-10 11:05:56,耗时 0 秒

@whyour
Copy link
Owner

whyour commented Feb 10, 2023

@sanxianla 排查网络问题,加上代理,不行强制更新

@sanxianla
Copy link
Author

@sanxianla 排查网络问题,加上代理,不行强制更新

强制更新是指的什么,依赖安装过程也可以加上代理吗,我之前修改了node源是淘宝源。()

@whyour
Copy link
Owner

whyour commented Feb 10, 2023

@sanxianla 配置里面不是有源的修改吗,系统设置-检查更新-强制更新

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants