Next.js - yarn dev: error Command failed with signal "SIGSEGV"

Viewed 4299

I am having this problem, whenever I am running yarn dev or npm 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"
  }
}
1 Answers

Appears to be a problem with Mac M1, as @Fernando Gomes commented.

In order to get it working on my environment, I am using Docker with following parameters:

docker buildx build --platform linux/amd64 .
Related