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

Bug: 启动报错 附上环境和报错信息 #20

Open
819295524 opened this issue Jan 19, 2022 · 19 comments
Open

Bug: 启动报错 附上环境和报错信息 #20

819295524 opened this issue Jan 19, 2022 · 19 comments
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed os:win

Comments

@819295524
Copy link

FFD3AC58-D141-4033-9AFC-D7BA6C6D4466
6D87D081-FDF6-4640-B9AA-06C05F0B2BD9

@819295524 819295524 added the bug Something isn't working label Jan 19, 2022
@819295524
Copy link
Author

系统是 windows11

@imcuttle
Copy link
Owner

see #16
推荐还是换成 类 linux shell,或者 mac 电脑 😢

@imcuttle imcuttle added the help wanted Extra attention is needed label Jan 19, 2022
This was referenced Jan 19, 2022
@imcuttle imcuttle pinned this issue Jan 19, 2022
@819295524
Copy link
Author

QQ图片20220120163137
换了linux 也一样 只能用mac吗

@imcuttle
Copy link
Owner

具体是什么原因呢,截图可以全一些

@gongzhaohui
Copy link

@imcuttle
Copy link
Owner

imcuttle commented Jan 22, 2022

@gongzhaohui 由于本人没有windows环境,所以推荐使用 linux shell 来执行
不保证 windows 能持续兼容

@darkread
Copy link

pnpm -v
6.28.0
node -v
v12.17.0
image
同样由这个问题,能否给出一个运行环境,我的是ubuntu 20.04,用的是windows wsl2子系统。

@imcuttle
Copy link
Owner

pnpm -v

6.28.0

node -v

v12.17.0

image

同样由这个问题,能否给出一个运行环境,我的是ubuntu 20.04,用的是windows wsl2子系统。

mac系统或者linux系统,你这个错误应该是不支持 xx=abc 这种环境变量赋值

@leehomeok
Copy link

pnpm 貌似不兼容window?

@gongzhaohui
Copy link

pnpm -v
6.28.0
node -v
v12.17.0
image
同样由这个问题,能否给出一个运行环境,我的是ubuntu 20.04,用的是windows wsl2子系统。

mac系统或者linux系统,你这个错误应该是不支持 xx=abc 这种环境变量赋值

改成
"set NODE_OPTIONS=\"$INNER_NODE_OPTIONS\" && set CLIENT_RENDER=1 && node scripts/start.js"
可以过。

@gongzhaohui
Copy link

gongzhaohui commented Jan 27, 2022

pnpm 貌似不兼容window?

不是pnpm的问题。1个是 执行node脚本时,前面要加node,形如node script。还有1个是设置环境变量。
例如
"set NODE_OPTIONS=\"$INNER_NODE_OPTIONS\" && set CLIENT_RENDER=1 && node scripts/start.js"

@wewaa
Copy link

wewaa commented Jan 27, 2022

"scripts": {
"start:cr": "set NODE_OPTIONS="$INNER_NODE_OPTIONS" && set CLIENT_RENDER=1 && node scripts/start.js",
"start:cr:debug": "INNER_NODE_OPTIONS=--inspect npm run start:cr",
"start": "node scripts/start.js",
"build": "node scripts/build.js"
},

Error: Cannot find module 'E:\mometa\packages\editor\node_modules@mometa\fs-handler\lib'

@imcuttle
Copy link
Owner

欢迎有win环境的同学提pr解决,但需保证mac unix系统也正常,可以使用 cross-env 赋值,甚至后续加上e2e测试在流水线中,同时加上win环境测试 就更好了

@gongzhaohui
Copy link

欢迎有win环境的同学提pr解决,但需保证mac unix系统也正常,可以使用 cross-env 赋值,甚至后续加上e2e测试在流水线中,同时加上win环境测试 就更好了

我不太懂git,可能你可以建一个win branch,只包含差异部分。现阶段我觉得可以只包含所有package.json,我不知道行不行得通,也不会实现。

@gongzhaohui
Copy link

gongzhaohui commented Jan 28, 2022

我的错误,pnpm i没结束。端口占用,我改成8585,仍然占用。post install 在哪里写的?
`[MMS] run on http://localhost:8585
│ events.js:353

│ throw er; // Unhandled 'error' event

│ ^

│ Error: listen EADDRINUSE: address already in use 127.0.0.1:8585

│ at Server.setupListenHandle [as _listen2] (net.js:1318:16)

│ at listenInCluster (net.js:1366:12)

│ at GetAddrInfoReqWrap.doListen [as callback] (net.js:1503:7)

│ at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:69:8)

│ Emitted 'error' event on Server instance at:

│ at emitErrorNT (net.js:1345:8)

│ at processTicksAndRejections (internal/process/task_queues.js:82:21) {

│ code: 'EADDRINUSE',

│ errno: -4091,

│ syscall: 'listen',

│ address: '127.0.0.1',

│ port: 8585

│ }

│ ERROR: "build:runtime" exited with 1.

└─ Failed in 9.3s

 ELIFECYCLE  Command failed with exit code 1.`

@birdmanmandbir
Copy link

可以用wsl

@HZZformGD
Copy link

@imcuttle 我也有这样的问题。 后面通过wsl2+子系统 Ubuntu 解决了。 我是win11 win10也一样可以的(win7 就不用我说了吧 再见了)

@chang-ke
Copy link

直接用 cross-env 这个 npm 包不就行了,跨平台设置环境变量很简单

@819295524
Copy link
Author

windows环境设置环境变量,参考https://stackoverflow.com/questions/40806796/setting-environment-variables-package-json-in-windows-10

谢谢🙏 我准备去试试

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed os:win
Projects
None yet
Development

No branches or pull requests

9 participants