Code Monkey home page Code Monkey logo

Comments (8)

khatruong2009 avatar khatruong2009 commented on August 30, 2024

Hi @spring-bconnect, are you using the amplify-js library for the web portion of your application?

from amplify-flutter.

spring-bconnect avatar spring-bconnect commented on August 30, 2024

from amplify-flutter.

spring-bconnect avatar spring-bconnect commented on August 30, 2024
Screenshot 2024-08-13 at 9 29 54 AM

from amplify-flutter.

spring-bconnect avatar spring-bconnect commented on August 30, 2024
Screenshot 2024-08-13 at 4 14 21 PM

How to generate this amplify folder if its separate frontend and backend?? As per the documentation given :

Only amplify_outputs.json is created?

Can you provide next steps so that build does not fail??

from amplify-flutter.

khatruong2009 avatar khatruong2009 commented on August 30, 2024

Hi @spring-bconnect, I see that you've run the first command to get the amplify_outputs.json file. Can you also run npx ampx generate outputs --app-id <your-backend-amplify-app-id> --branch main --format dart --out-dir lib command so that you get the amplify_outputs.dart file as well for the dart side as well?

from amplify-flutter.

spring-bconnect avatar spring-bconnect commented on August 30, 2024
Screenshot 2024-08-14 at 2 41 32 PM

I did the same for dart amplify outputs generation. Getting the same when I try to deploy next js app

from amplify-flutter.

spring-bconnect avatar spring-bconnect commented on August 30, 2024

Amplify folder is outside the frontend apps in monorepo structure.. in shared backend.. As per error it constructs:

Amplify Backend not found

What setup is required so that it points to amplify backend generated and hosted separately on server.

npx ampx generate outputs --branch main --app-id BACKEND_APP_ID

Above command only generates amplify_outputs.json file. It does not create amplify folder in root directory.

Is there any configuration missing or its a bug??

from amplify-flutter.

salihgueler avatar salihgueler commented on August 30, 2024

Hello @spring-bconnect, thanks for reaching out. With Monorepo support, you should not need any amplify folder as it is in a separate place. So that part should not be a problem.

For your application to understand what kind of configuration you have, it should generate amplify_outputs.json for Next.js application and amplify_outputs.dart for the Flutter application.

For generating the amplify_outputs.dart, you can run the following command in the amplify.yaml file that you can find in the build settings.

version: 1
backend:
  phases:
    build:
      commands:
        - npm ci --cache .npm --prefer-offline
        - npx ampx generate outputs --branch $AWS_BRANCH --app-id $AWS_APP_ID --format dart --out-dir lib

Also, you did the setup as monorepo, right? So the amplify folder is known by the console.

from amplify-flutter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.