我是下一个js/react项目。在我的本地,它是完美的工作,任何更新的网页也是更新的网站。我已经部署了这个项目与天青和我的回购是在吉突行动。我也有吉顿行动的设置。我做了一个新的分支,并在那里做了一些改变,最后我把这个分支合并成了主要的分支,但是我的改变不会发生。在Github操作中,在构建和部署中,它显示了以下错误
App Directory Location: '/' was found.
Looking for event info
Starting to build app with Oryx
Azure Static Web Apps utilizes Oryx to build both static applications and Azure Functions. You can find more details on Oryx here: https://github.com/microsoft/Oryx
---Oryx build logs---
Operation performed by Microsoft Oryx, https://github.com/Microsoft/Oryx
You can report issues at https://github.com/Microsoft/Oryx/issues
Oryx Version: 0.2.20221103.1, Commit: a2c65dde152b749fea395f4d1242ea9350942258, ReleaseTagName: 20221103.1
Build Operation ID: |c+FkE1pA5Rs=.7d546986_
Repository Commit : 065130ddcad0d0d8b0c5b136069ae0f375d3d64e
Detecting platforms...
Detected following platforms:
nodejs: 16.18.0
Version '16.18.0' of platform 'nodejs' is not installed. Generating script to install it...
Detected the following frameworks: Next.js
Source directory : /github/workspace
Destination directory: /bin/staticsites/ss-oryx/app
Downloading and extracting 'nodejs' version '16.18.0' to '/opt/nodejs/16.18.0'...
Detected image debian flavor: bullseye.
Downloaded in 1 sec(s).
Verifying checksum...
Extracting contents...
performing sha512 checksum for: nodejs...
Done in 2 sec(s).
Removing existing manifest file
Creating directory for command manifest file if it does not exist
Creating a manifest file...
Node Build Command Manifest file created.
Using Node version:
v16.18.0
Using Npm version:
8.19.2
Running 'npm install --unsafe-perm'...
added 119 packages, and audited 120 packages in 4s
26 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
Running 'npm run build'...
> nextjs-static-website@0.1.0 build
> next build && next export
info - Loaded env from /github/workspace/.env.local
Attention: Next.js now collects completely anonymous telemetry regarding usage.
This information is used to shape Next.js' roadmap and prioritize features.
You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
https://nextjs.org/telemetry
info - using build directory: /github/workspace/.next
Error: Could not find a production build in the '/github/workspace/.next' directory. Try building your app with 'next build' before starting the static export. https://nextjs.org/docs/messages/next-export-no-build-id
at /github/workspace/node_modules/next/dist/export/index.js:62:19
at async Span.traceAsyncFn (/github/workspace/node_modules/next/dist/trace/trace.js:79:20)
---End of Oryx build logs---
Oryx has failed to build the solution.
For further information, please visit the Azure Static Web Apps documentation at https://docs.microsoft.com/en-us/azure/static-web-apps/
If you believe this behavior is unexpected, please raise a GitHub issue at https://github.com/azure/static-web-apps/issues/
Exiting
0s请告诉我如何解决这个问题。在提交之前,我还运行了npm运行构建和npm。谢谢
我在等人帮忙
发布于 2022-11-16 16:42:31
1-在package.json中指定节点版本和npm版本(您在本地使用)
e-g:
“引擎”:{“节点”:"14.17.4","npm":"6.14.13“}
2-使用以下文本在根目录上创建.npmrc文件:
发动机-严格=真
https://stackoverflow.com/questions/74453313
复制相似问题