Next.js - yarn dev:error命令失败,信号为“SIGSEGV”

r55awzrz  于 12个月前  发布在  Yarn
关注(0)|答案(3)|浏览(242)

每当我运行yarn devnpm run dev时,我都会遇到这个问题:

yarn run v1.22.10
warning ../../../../package.json: No license field
$ next dev
ready - started server on 0.0.0.0:3000, url: http://localhost:3000
info  - Using webpack 5. Reason: no next.config.js https://nextjs.org/docs/messages/webpack5
event - compiled successfully
event - build page: /
wait  - compiling...
error Command failed with signal "SIGSEGV".
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

字符串
package.json

{
  "name": "nextjs",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "dev": "next dev",
    "build": "next build",
    "start": "next start"
  },
  "dependencies": {
    "next": "^10.2.3",
    "react": "17.x",
    "react-dom": "17.x",
    "webpack": "^5.39.1"
  },
  "devDependencies": {
    "webpack-cli": "^4.7.2"
  }
}

6tqwzwtp

6tqwzwtp1#

正如@Fernando Gomes评论的那样,似乎是Mac M1的问题。
为了让它在我的环境中工作,我使用 Docker,参数如下:

docker buildx build --platform linux/amd64 .

字符串

6kkfgxo0

6kkfgxo02#

要解决这个问题,首先做一个清洁:

yarn clean

字符串
然后

yarn dev

xghobddn

xghobddn3#

在我的情况下是一个问题的无线网络:?.我知道是奇怪的关闭无线网络,一切都开始工作。

相关问题