microsoft / Oryx

Build your repo automatically.
Other
730 stars 167 forks source link

Deployment failure for Next.js app #2469

Open swarnilnayan opened 1 week ago

swarnilnayan commented 1 week ago

Bug Report

Using Node version: v16.20.2

Using Npm version: 8.19.4

Running 'npm install'...

npm WARN EBADENGINE Unsupported engine { npm WARN EBADENGINE package: 'next@14.2.4', npm WARN EBADENGINE required: { node: '>=18.17.0' }, npm WARN EBADENGINE current: { node: 'v16.20.2', npm: '8.19.4' } npm WARN EBADENGINE } npm WARN deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported npm WARN deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. npm WARN deprecated @humanwhocodes/config-array@0.11.14: Use @eslint/config-array instead npm WARN deprecated @humanwhocodes/object-schema@2.0.3: Use @eslint/object-schema instead npm WARN deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported

added 382 packages, and audited 383 packages in 12s

136 packages are looking for funding run npm fund for details

found 0 vulnerabilities

Running 'npm run build'...

site@0.1.0 build next build

You are using Node.js 16.20.2. For Next.js, Node.js version >= v18.17.0 is required.

---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

Using Node version: v16.20.2

Using Npm version: 8.19.4

Running 'npm install'...

npm WARN EBADENGINE Unsupported engine { npm WARN EBADENGINE package: 'next@14.2.4', npm WARN EBADENGINE required: { node: '>=18.17.0' }, npm WARN EBADENGINE current: { node: 'v16.20.2', npm: '8.19.4' } npm WARN EBADENGINE } npm WARN deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported npm WARN deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. npm WARN deprecated @humanwhocodes/config-array@0.11.14: Use @eslint/config-array instead npm WARN deprecated @humanwhocodes/object-schema@2.0.3: Use @eslint/object-schema instead npm WARN deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported

added 382 packages, and audited 383 packages in 12s

136 packages are looking for funding run npm fund for details

found 0 vulnerabilities

Running 'npm run build'...

site@0.1.0 build next build

You are using Node.js 16.20.2. For Next.js, Node.js version >= v18.17.0 is required.

---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

Using Node version:
v16.20.2

Using Npm version:
8.19.4

Running 'npm install'...

npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: 'next@14.2.4',
npm WARN EBADENGINE   required: { node: '>=18.17.0' },
npm WARN EBADENGINE   current: { node: 'v16.20.2', npm: '8.19.4' }
npm WARN EBADENGINE }
npm WARN deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported
npm WARN deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm WARN deprecated @humanwhocodes/config-array@0.11.14: Use @eslint/config-array instead
npm WARN deprecated @humanwhocodes/object-schema@2.0.3: Use @eslint/object-schema instead
npm WARN deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported

added 382 packages, and audited 383 packages in 12s

136 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

Running 'npm run build'...

> site@0.1.0 build
> next build

You are using Node.js 16.20.2. For Next.js, Node.js version >= v18.17.0 is required.

---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

{ "name": "site", "version": "0.1.0", "private": true, "scripts": { "dev": "next dev", "build": "next build", "start": "next start", "lint": "next lint" }, "dependencies": { "@headlessui/react": "^2.0.4", "@heroicons/react": "^2.1.3", "dompurify": "^3.1.5", "next": "14.2.4", "next-secure-headers": "^2.2.0", "nextjs-progressbar": "^0.0.16", "react": "^18", "react-dom": "^18", "swiper": "^11.1.4" }, "devDependencies": { "@types/node": "^20", "@types/react": "^18", "@types/react-dom": "^18", "eslint": "^8", "eslint-config-next": "14.2.4", "postcss": "^8", "tailwindcss": "^3.4.1", "typescript": "^5" }, "engines": { "node": ">=18.17.0" } } package.json

name: Azure Static Web Apps CI/CD

on: push: branches:

jobs: build_and_deploy_job: if: github.event_name != 'pull_request' || (github.event_name == 'pull_request' && github.event.action != 'closed') runs-on: ubuntu-latest name: Build and Deploy Job steps:

oh-kwaku commented 1 week ago

I'm also experiencing similar issue. No matter what nodejs version I set in the workflow file, i get npm WARN EBADENGINE Unsupported engine { npm WARN EBADENGINE package: 'next@14.2.4', npm WARN EBADENGINE required: { node: '>=18.17.0' }, npm WARN EBADENGINE current: { node: 'v16.20.2', npm: '8.19.4' } npm WARN EBADENGINE }

similar to what has already been reported