Comments (10)
这个目录下应该会有一个node.exe文件的,方便告知一下该文件不存在的原因吗(自己手动删除了或者更新新版本之后就这样了……)
目前提供一个简单的解决方法,复制nvmd.exe并重命名为node.exe即可(在截图的这个目录下)
from nvm-desktop.
from nvm-desktop.
你试试将%HOMEPATH%\.nvmd
这个目录整个删除,然后再重新启动nvm-desktop
客户端试试呢 看是否依旧会丢失node.exe
文件
注意需要使用管理员权限运行
from nvm-desktop.
这个目录下应该会有一个node.exe文件的,方便告知一下该文件不存在的原因吗(自己手动删除了或者更新新版本之后就这样了……)
目前提供一个简单的解决方法,复制nvmd.exe并重命名为node.exe即可(在截图的这个目录下)
删了,安装2遍都不行,用的管理员权限,复制nvmd.exe重命名为node.exe可以
from nvm-desktop.
这就奇怪了 这些文件都是在启动的时候会复制写入到%HOMEPATH%\.nvmd\bin
目录下的 这是相关的代码:
async function updateToSchemaVersionDefault(version: number) {
if (version >= 1) return;
if (platform === "win32") {
// windows
await setNvmdToPathForWindows();
const exeSourceFile = app.isPackaged
? join(process.resourcesPath, "assets", "sources", `${arch}.exe`)
: join(__dirname, "../../..", "assets", "sources", `${arch}.exe`);
const cmdSourceFile = app.isPackaged
? join(process.resourcesPath, "assets", "sources", "temp.cmd")
: join(__dirname, "../../..", "assets", "sources", "temp.cmd");
const promises: Array<Promise<void>> = [];
promises.push(copy(exeSourceFile, join(BIN_DIR, "nvmd.exe")).catch((_err) => {}));
["node", "npm", "npx", "corepack"].forEach((name) => {
promises.push(copy(exeSourceFile, join(BIN_DIR, `${name}.exe`)).catch((_err) => {}));
if (name !== "node") {
promises.push(copy(cmdSourceFile, join(BIN_DIR, `${name}.cmd`)).catch((_err) => {}));
}
});
await Promise.all(promises);
setSchemaVersion(CURRENT_MIGRATION_VERSION);
return;
}
// remove file: .nvmd/shell
if (await pathExists(`${APPDIR}/shell`)) {
await remove(`${APPDIR}/shell`);
}
// remove file: .nvmd/nvmd.sh
if (await pathExists(`${APPDIR}/nvmd.sh`)) {
await remove(`${APPDIR}/nvmd.sh`);
}
// macOS
const targetFile = join(BIN_DIR, "nvmd");
const sourceFile = app.isPackaged
? join(process.resourcesPath, "assets", "sources", "nvmd")
: join(__dirname, "../../..", "assets", "sources", "nvmd");
await copy(sourceFile, targetFile).catch((_err) => {});
await Promise.all(
["node", "npm", "npx", "corepack"].map((name) =>
symlink(targetFile, join(BIN_DIR, name)).catch((_err) => {})
)
);
setSchemaVersion(CURRENT_MIGRATION_VERSION);
return;
}
然后当后续版本升级时会替换掉所有的*.exe
的文件:
async function updateToSchemaVersionLast(version: number) {
if (version >= CURRENT_MIGRATION_VERSION) return;
// Macos or Linux
if (platform !== "win32") {
const targetFile = join(BIN_DIR, "nvmd");
await remove(targetFile);
const sourceFile = app.isPackaged
? join(process.resourcesPath, "assets", "sources", "nvmd")
: join(__dirname, "../../..", "assets", "sources", "nvmd");
await copy(sourceFile, targetFile).catch((_err) => {});
await setSchemaVersion(CURRENT_MIGRATION_VERSION);
return;
}
// Windows
const targetFile = join(BIN_DIR, "nvmd.exe");
await remove(targetFile);
const sourceFile = app.isPackaged
? join(process.resourcesPath, "assets", "sources", `${arch}.exe`)
: join(__dirname, "../../..", "assets", "sources", `${arch}.exe`);
await copy(sourceFile, targetFile).catch((_err) => {});
async function updateFile(fileName: string) {
const filePath = join(BIN_DIR, fileName);
await remove(filePath);
await copy(sourceFile, filePath).catch((_err) => {});
return;
}
const files = await readdir(BIN_DIR);
await Promise.all(
files.filter((name) => name.endsWith(".exe")).map((fileName) => updateFile(fileName))
);
await setSchemaVersion(CURRENT_MIGRATION_VERSION);
return;
}
根据你们的截图来看 是有一些成功了有一些失败了 目前没有什么头绪.....感觉还是跟系统的权限有一些关系.....
from nvm-desktop.
@Yfkj01 @EdenSpark 你们方便安装一下这个版本运行吗:Release test_log 里面添加了一些日志的记录
- 安装好之后先删除
%HOMEPATH%\.nvmd
目录下的bin\
目录和migration
文件,然后再启动。 - 启动之后日志会记录在
%HOMEPATH%\.nvmd\main.log
文件中
然后麻烦提供一下这个日志文件,以用来定位具体的问题。谢谢 🌹
from nvm-desktop.
出现了和这个问题反过来的问题。npm.exe不存在,但是node.exe存在
from nvm-desktop.
@Yfkj01 @EdenSpark 你们方便安装一下这个版本运行吗:Release test_log 里面添加了一些日志的记录
- 安装好之后先删除
%HOMEPATH%\.nvmd
目录下的bin\
目录和migration
文件,然后再启动。- 启动之后日志会记录在
%HOMEPATH%\.nvmd\main.log
文件中然后麻烦提供一下这个日志文件,以用来定位具体的问题。谢谢 🌹
@lainbo 你可以试试安装 Release test_log 这个版本吗 然后安装说明提供一下log文件 以便定位到具体问题
from nvm-desktop.
This issue is stale because it has been open for 30 days with no activity.
from nvm-desktop.
Related Issues (20)
- Errors building on Arch Linux HOT 6
- 页面样式有点问题 HOT 7
- 增加一个配置导入导出的功能 HOT 4
- 我的项目中需要调用外部dll,dll是32位的,我要怎么下载32位的node,64位的调用DLL出错 HOT 2
- 【建议】后面会有docker镜像吗 HOT 5
- nvm-desktop: command not found HOT 3
- MacOS M1 is says app files is corrupted. HOT 5
- SSL 证书 HOT 15
- 能否支持cnpm yarn pnpm npx nvm 等包管理器 HOT 6
- 循环查找父级的.nvmdrc HOT 8
- 能自动读取 .nvmdrc 中的node版本吗? HOT 3
- 360报毒 HOT 3
- 命令不起作用 HOT 8
- 接口请求超时? HOT 3
- 期望界面增加一键安装全局包的功能 HOT 3
- npm link无效 HOT 4
- 关于windows下载的问题 HOT 6
- RequestError: unable to verify the first certificate HOT 4
- RequestError: unable to verify the first certificate HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nvm-desktop.