每当我运行yarn dev或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"
}
}发布于 2022-05-24 18:01:33
Mac M1作为@Fernando Gomes commented似乎是个问题。
为了让它在我的环境中运行,我使用了带有以下参数的Docker:
docker buildx build --platform linux/amd64 .https://stackoverflow.com/questions/68019023
复制相似问题