【发布时间】:2022-12-09 09:53:41
【问题描述】:
因此,我创建了一个使用我的 MongoDB 和其他环境变量的 Meteor 项目。因此,我创造.sh归档并记下这些。
MONGO_URL="mongodb:<MY DATABASE>" meteor --settings settings.json
然而,Meteor 无法意识到当前的操作系统是 Windows,因此它一直尝试使用 Linux 的路径寻找 meteor 模块。这是错误日志。
在 Windows 中使用已配置的数据库实例运行 Meteor
/mnt/c/Users/mq003/AppData/Local/.meteor/packages/meteor-tool/2.2.0/mt-os.windows.x86_64/meteor: line 137: /mnt/c/Users/mq003/AppData/Local/.meteor/packages/meteor-tool/2.2.0/mt-os.windows.x86_64/dev_bundle/bin/node: No such file or directory
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file C:\Windows\system32\cmd.exe
npm ERR! errno ENOENT
npm ERR! simple-todos-react@ w-start: `cd build\bin && bash w-run.sh`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the simple-todos-react@ w-start 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! C:\Users\mq003\AppData\Roaming\npm-cache\_logs\2022-12-06T17_29_40_599Z-debug.log
有人知道如何在 Windows 中执行此操作吗?先感谢您。
【问题讨论】: