Errors for yarn create @phaserjs/game on macOS and Linux (via Docker)

未关闭
#8 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
48/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
冷清
技术栈
docker, javascript, node.js
领域
cli

调研方向

Start with package-lock.json and the package installation path used by yarn create @phaserjs/game; reproduce in the provided node:24 Docker container and compare with the working npm command. Trace the old @achrinza/node-ipc dependency and the generated executable's node\r failure. Done means the Yarn command works on macOS and Linux without either error.

由索引模型根据 Issue 内容生成。

描述

I'm encountering errors when trying to install via yarn on macOS, both on the host machine and Docker.

When I try on my Windows host machine, there's no error and the tool runs as expected. However, trying to run it in Docker on Windows (via WSL) results in the same error as in Docker on macOS.

The npm version of the command is working alright in these environments.

Expected Result

Running yarn create @phaserjs/game should result in the experience as described on https://phaser.io/tutorials/create-game-app, such as when running npm create @phaserjs/game@latest which I can confirm works as expected.

Actual Results

Two different errors are observed on a macOS host machine and when using Docker on macOS and Windows.

Details
Environment
  • OS: macOS Tahoe 26.3.1
  • Processor: Apple M1 Max
  • Node: v24.14.1
Result
$ yarn create @phaserjs/game
yarn create v1.22.22
(node:5134) [DEP0169] DeprecationWarning: `url.parse()` behavior is not standardized and prone to errors that have security implications. Use the WHATWG URL API instead. CVEs are not issued for `url.parse()` vulnerabilities.
(Use `node --trace-deprecation ...` to show where the warning was created)
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
error @achrinza/[email protected]: The engine "node" is incompatible with this module. Expected version "8 || 9 || 10 || 11 || 12 || 13 || 14 || 15 || 16 || 17 || 18". Got "24.14.1"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/create for documentation about this command.
Notes

The main issue in this case appears to be achrinza/[email protected] wants way too old of a version of node. Not sure where this dependency is coming from as it is not mentioned in package-json.lock.

Environment
  • OS: Debian 12, Official Node Docker image (from macOS and Windows host machines)
  • Processor: Apple M1 Max (macOS), Intel Core i7 (Windows 11)
  • Node: v24.14.1
Result
node@a387d937ba78:~$ yarn create @phaserjs/game
yarn create v1.22.22
(node:275) [DEP0169] DeprecationWarning: `url.parse()` behavior is not standardized and prone to errors that have security implications. Use the WHATWG URL API instead. CVEs are not issued for `url.parse()` vulnerabilities.
(Use `node --trace-deprecation ...` to show where the warning was created)
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Installed "@phaserjs/[email protected]" with binaries:
      - create-game
/usr/bin/env: 'node\r': No such file or directory
/usr/bin/env: use -[v]S to pass options in shebang lines
error Command failed.
Exit code: 127
Command: /home/node/.yarn/bin/create-game
Arguments:
Directory: /home/node
Output:

info Visit https://yarnpkg.com/en/docs/cli/create for documentation about this command.
Notes

I also got the /usr/bin/env: 'node\r': No such file or directory when using Node 18 on macOS, in my attempt to appease the "incompatible with this module" error.

Notice how that DeprecationWarning: url.parse() shows up in either environment. I think there's something up with the create utility and yarn because as an additional test, I tried running the once famous yarn create react-appcommand to compare and it also had that "DeprecationWarning", but it completed successfully.

Testing

The best way to test might be with Docker, for the most portable experience.

Recommended Instructions
  • Install Docker for Mac/Windows
  • Run docker run -it --name my-node node:24 su - node to create an official node Docker container using version 24, which will start you on a bash terminal as the node user
    • Optionally add --rm to remove the container after exiting out of the bash session
  • Confirm that corepack and yarn are installed such as with which yarn and which corepack
  • Run yarn create @phaserjs/game and observe the results

To repeat, I'm able to run npm create @phaserjs/game@latest with no issue and then convert the project to yarn afterwards. I've not tried the other commands such as for pnpm, bun, etc.

主要语言
JavaScript
星标
73
派生
17
PR 合并指标
30 天内没有已合并 PR

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

phaserjs/create-game 的其他 Issue

查看 phaserjs/create-game 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。