Skip to content
This repository has been archived by the owner on Aug 15, 2023. It is now read-only.

关于 node 路径问题 #760

Closed
BTMuli opened this issue Mar 29, 2022 · 5 comments
Closed

关于 node 路径问题 #760

BTMuli opened this issue Mar 29, 2022 · 5 comments
Assignees
Labels
question Further information is requested

Comments

@BTMuli
Copy link
Contributor

BTMuli commented Mar 29, 2022

问题描述

我是下午将系统重装了一下,然后把 node 装到了自定义的文件夹,然后下午把备份到硬盘上的文件夹移回来跑的时候,发现初始化一直跳出

Need to install the following packages:
  node
Ok to proceed? (y) 

的消息,然后我选 y 之后再初始化也是上面的消息,是不是因为我的 node 没有安装到默认路径?

复现流程

npm run init

后台日志

No response

运行环境

Need to install the following packages:
  node
Ok to proceed? (y)

当前提交

commit d207d474d74f1b8e5f6c6990f1949f3aec4a6aae (HEAD -> dev, upstream/master, upstream/dev, origin/master, origin/HEAD)Author: Mark Chen <9006264+Mark9804@users.noreply.github.com>
Date:   Mon Mar 28 13:21:42 2022 +0900

    补完2.6版本更新资源,Close #742 , Close #689

代码状态

On branch dev
Your branch is up to date with 'upstream/dev'.

nothing to commit, working tree clean
@BTMuli BTMuli added bug Something isn't working question Further information is requested labels Mar 29, 2022
@mark9804 mark9804 removed the bug Something isn't working label Mar 29, 2022
@mark9804
Copy link
Collaborator

Windows 下安装通常会出一些比较奇怪的问题,这个可能没法支持

麻烦对照 #140 排查一下,看看有没有把 node 加入 PATH 变量

@Arondight
Copy link
Owner

你要是嫌在 Windows 配置 PATH 麻烦,可以在 git bash 里配置 PATH ,就跟你写 puppeteer 的环境变量一样

@Arondight Arondight self-assigned this Mar 29, 2022
@BTMuli
Copy link
Contributor Author

BTMuli commented Mar 29, 2022

晚上我查了一下,是 node 安装失败,用 --force 强制安装之后根据报错信息,发现是因为我下的 npm 版本过高了T_T

Arondight added a commit that referenced this issue Mar 30, 2022
@Arondight
Copy link
Owner

git pull -p
npm install
npm run init

@Arondight
Copy link
Owner

再更新一下应该可以了, npx 的行为变了

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants