aws-amplify / amplify-hosting

AWS Amplify Hosting provides a Git-based workflow for deploying and hosting fullstack serverless web applications.
https://aws.amazon.com/amplify/hosting/
Apache License 2.0
449 stars 113 forks source link

SSR build failure: Standalone directory not found #3383

Closed kamit1983 closed 1 year ago

kamit1983 commented 1 year ago

Before opening, please confirm:

App Id

NEW_APP

AWS Region

us-east-2

Amplify Hosting feature

Build settings, Frontend builds, Monorepo

Describe the bug

Standalone folder not getting created.

Expected behavior

Deployment should go through

Reproduction steps

Trigger deployment

Build Settings

Not provided

Log output

Build logs

Put your logs below this line

Build logs: 2023-03-22T05:30:05.543Z [INFO]: # Starting phase: preBuild

Executing command: yarn install

2023-03-22T05:30:05.814Z [INFO]: yarn install v1.22.0 2023-03-22T05:30:05.934Z [WARNING]: warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json. 2023-03-22T05:30:05.940Z [INFO]: [1/4] Resolving packages... 2023-03-22T05:30:06.616Z [INFO]: success Already up-to-date. 2023-03-22T05:30:06.620Z [INFO]: Done in 0.81s. 2023-03-22T05:30:06.630Z [INFO]: # Completed phase: preBuild

Starting phase: build

2023-03-22T05:30:06.630Z [INFO]: # Executing command: npx nx build next-noumena-web 2023-03-22T05:30:08.594Z [INFO]: 2023-03-22T05:30:08.594Z [INFO]: > nx run next-noumena-web:build:production 2023-03-22T05:30:09.460Z [INFO]: info - Loaded env from apps/next-noumena-web/.env 2023-03-22T05:30:09.596Z [INFO]: warn - No build cache found. Please configure build caching for faster rebuilds. Read more: https://nextjs.org/docs/messages/no-cache 2023-03-22T05:30:09.609Z [INFO]: Attention: Next.js now collects completely anonymous telemetry regarding usage. 2023-03-22T05:30:09.609Z [INFO]: 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 2023-03-22T05:30:09.644Z [INFO]: info - Checking validity of types... 2023-03-22T05:30:15.091Z [INFO]: info - Creating an optimized production build... 2023-03-22T05:30:32.831Z [INFO]: info - Compiled successfully 2023-03-22T05:30:32.833Z [INFO]: info - Collecting page data... 2023-03-22T05:30:35.107Z [INFO]: info - Generating static pages (0/5) 2023-03-22T05:30:35.238Z [INFO]: GraphQl Provider Rendered 2023-03-22T05:30:35.266Z [INFO]: info - Generating static pages (1/5) 2023-03-22T05:30:35.267Z [INFO]: GraphQl Provider Rendered 2023-03-22T05:30:35.267Z [INFO]: GraphQl Provider Rendered 2023-03-22T05:30:35.269Z [INFO]: info - Generating static pages (2/5) 2023-03-22T05:30:35.270Z [INFO]: GraphQl Provider Rendered 2023-03-22T05:30:35.272Z [INFO]: info - Generating static pages (3/5) 2023-03-22T05:30:35.282Z [INFO]: GraphQl Provider Rendered 2023-03-22T05:30:35.311Z [INFO]: info - Generating static pages (5/5) 2023-03-22T05:30:35.319Z [INFO]: info - Finalizing page optimization... 2023-03-22T05:30:35.322Z [INFO]: 2023-03-22T05:30:35.340Z [INFO]: Page Size First Load JS ┌ /_app 0 B 119 kB ├ ○ /404 193 B 119 kB ├ ● /noum 368 B 120 kB └ ● /noum/[id] (357 ms) 151 kB 270 kB └ css/498922c86c3808a2.css 4.77 kB ├ /noum/637713401add5d000c9da646 └ /noum/6412e18b087a38000dab19f4

Additional information

Next.config.js // eslint-disable-next-line @typescript-eslint/no-var-requires const withNx = require('@nrwl/next/plugins/with-nx');

/**

module.exports = withNx(nextConfig);

amplyfy.yml not provided

Package.json { "version": "0.1.0", "license": "(C) Noumena Partners LLC", "scripts": { "dev": "next dev", "build": "next build", "start": "next start" }, "dependencies": { "@apollo/client": "^3.6.2", "@apollo/federation": "^0.20.4", "@apollo/gateway": "^2.0.2", "@date-io/date-fns": "^1.3.13", "@devbookhq/splitter": "^1.3.2", "@emotion/react": "^11.8.2", "@emotion/styled": "^11.8.1", "@hookform/resolvers": "^2.8.8", "@material-ui/core": "^4.12.3", "@material-ui/icons": "4.9.1", "@material-ui/lab": "4.0.0-alpha.57", "@material-ui/pickers": "^3.3.10", "@mui/icons-material": "^5.5.1", "@mui/lab": "^5.0.0-alpha.74", "@mui/material": "^5.5.2", "@mui/x-data-grid": "^5.8.0", "@mui/x-data-grid-generator": "^5.8.0", "@nrwl/next": "13.2.3", "@reduxjs/toolkit": "^1.8.1", "@sentry/react": "^6.19.7", "@types/clevertap-web-sdk": "^1.1.0", "@types/dompurify": "^2.3.4", "@types/react-beautiful-dnd": "^13.1.2", "@types/sinon": "^10.0.6", "@types/validator": "^13.7.1", "apollo-server": "^2.19.0", "apollo-server-express": "^2.19.0", "aws-sdk": "^2.1043.0", "axios": "^0.24.0", "bcryptjs": "^2.4.3", "body-parser": "^1.19.0", "classnames": "^2.3.1", "clevertap-web-sdk": "^1.1.3", "compression": "^1.7.4", "core-js": "^3.6.5", "cors": "^2.8.5", "country-flags-svg": "^1.1.6", "date-fns": "^2.22.1", "dompurify": "^2.4.0", "env-smart": "^2.2.5", "express": "^4.17.1", "express-http-context": "^1.2.4", "express-validation": "^3.0.8", "formik": "^2.2.9", "framer-motion": "^5.3.3", "graphql": "^15.5.3", "graphql-transform-federation": "^2.2.0", "helmet": "^4.6.0", "http-status": "^1.5.0", "i18next": "^21.6.9", "joi-objectid": "^4.0.2", "json2csv": "^5.0.6", "jwt-decode": "^3.1.2", "mdi-material-ui": "6.21.0", "method-override": "^3.0.0", "mongodb": "^4.2.2", "mongoose": "^5.9.15", "mongoose-delete": "^0.5.2", "mongoose-field-encryption": "^4.0.3", "mongoose-id-validator": "^0.6.0", "morgan": "^1.10.0", "next": "^13.2.5-canary.12", "passport": "^0.5.0", "passport-jwt": "^4.0.0", "polished": "^4.2.2", "quill-magic-url": "^4.2.0", "quill-paste-smart": "^1.4.10", "react": "^18.2.0", "react-beautiful-dnd": "^13.1.0", "react-datasheet": "^1.4.9", "react-datasheet-grid": "^4.1.1", "react-dom": "^18.2.0", "react-flags-select": "^2.1.2", "react-flow-renderer": "^10.0.6", "react-grid-layout": "^1.3.4", "react-grid-system": "^8.0.1", "react-hook-form": "^7.30.0", "react-i18next": "11.15.3", "react-is": "17.0.2", "react-loader-spinner": "^6.0.0-0", "react-mobile-store-button": "^0.0.6", "react-otp-input": "^2.4.0", "react-phone-input-2": "^2.15.0", "react-plaid-link": "^3.3.2", "react-popper": "^2.2.4", "react-quill": "^1.3.5", "react-router": "^6.2.2", "react-router-dom": "^6.2.2", "react-syntax-highlighter": "^15.5.0", "react-virtuoso": "^2.2.8", "redis": "^4.0.4", "redux-saga": "^1.1.3", "regenerator-runtime": "0.13.7", "resizable-panels-react": "2.0.8", "spin.js": "^4.1.1", "styled-components": "^5.3.5", "ts-pattern": "^3.3.5", "ts-sinon": "^2.0.2", "tslib": "^2.0.0", "uniqid": "^5.4.0", "uuid": "^8.3.2", "validator": "^13.7.0", "winston": "^3.3.3", "winston-daily-rotate-file": "^4.5.5", "yup": "^0.32.11" }, "devDependencies": { "@graphql-codegen/cli": "^2.6.2", "@graphql-codegen/introspection": "^2.1.1", "@graphql-codegen/named-operations-object": "^2.2.1", "@graphql-codegen/typescript-operations": "^2.4.0", "@graphql-codegen/typescript-react-apollo": "^3.2.14", "@nrwl/cli": "13.2.3", "@nrwl/cypress": "13.8.3", "@nrwl/devkit": "13.2.3", "@nrwl/eslint-plugin-nx": "13.2.3", "@nrwl/express": "^13.8.3", "@nrwl/jest": "13.2.3", "@nrwl/linter": "13.2.3", "@nrwl/next": "13.2.3", "@nrwl/node": "^13.2.3", "@nrwl/react": "^13.8.3", "@nrwl/tao": "13.2.3", "@nrwl/web": "13.8.3", "@nrwl/workspace": "13.2.3", "@sinonjs/fake-timers": "^8.1.0", "@testing-library/react": "12.1.2", "@testing-library/react-hooks": "7.0.2", "@types/express": "^4.17.13", "@types/faker": "^5.5.9", "@types/jest": "27.0.2", "@types/json2csv": "^5.0.3", "@types/node": "14.14.33", "@types/passport": "^1.0.7", "@types/passport-jwt": "^3.0.6", "@types/react": "17.0.30", "@types/react-dom": "17.0.9", "@types/react-is": "17.0.2", "@types/react-syntax-highlighter": "^13.5.2", "@types/styled-components": "^5.1.21", "@types/uuid": "^8.3.4", "@typescript-eslint/eslint-plugin": "~4.33.0", "@typescript-eslint/parser": "~4.33.0", "babel-jest": "27.2.3", "babel-plugin-styled-components": "2.0.7", "cypress": "^9.1.0", "eslint": "7.32.0", "eslint-config-next": "^13.2.4", "eslint-config-prettier": "8.1.0", "eslint-plugin-cypress": "^2.10.3", "eslint-plugin-import": "2.25.2", "eslint-plugin-jsx-a11y": "6.5.1", "eslint-plugin-react": "7.27.0", "eslint-plugin-react-hooks": "4.3.0", "faker": "^5.5.3", "jest": "27.2.3", "node-gyp": "9.3.1", "prettier": "^2.3.1", "react-test-renderer": "17.0.2", "supertest": "^6.1.6", "ts-jest": "27.0.5", "typescript": "~4.4.3", "zx": "^4.2.0" } }

ghost commented 1 year ago

Hi @kamit1983 👋🏽 Are you trying to deploy a Next.js 13 application that lives in a monorepo? We do not support hosting Next.js apps with monorepos at this time but the team is treating this as a priority feature.

If you're not using a monorepo, please provide your app ID so we can further investigate the build error.

kamit1983 commented 1 year ago

Yes we are trying to deploy a nextjs app that lives in nx monorepo. Thanks for the clarification, this will save a ton of time for me.

github-actions[bot] commented 1 year ago

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.

github-actions[bot] commented 1 year ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.