Giter Site home page Giter Site logo

bojidaryovchev / next-amplify Goto Github PK

View Code? Open in Web Editor NEW
10.0 10.0 3.0 140 KB

AWS Amplify Next.js NextAuth Prisma GraphQL Nexus.js

License: MIT License

JavaScript 1.67% TypeScript 73.26% CSS 25.08%
aws-amplify graphql next-auth nextjs nexusjs prisma

next-amplify's People

Contributors

bojidaryovchev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

next-amplify's Issues

Still getting the ENOENT error

Hey @bojidaryovchev!

Appreciate that you've made this repo and for your feedback here: prisma/prisma#10200

I'm pretty sure I have the exact same setup that you have in this repo (minus the graphql stuff)

Just wondering if you are reliably able to deploy a nextjs + prisma app to Amplify?

Let me know if I can share some more details about my setup to see if you are able to help? Maybe we can even jump on a call?

Build Failed with Module not found: Can't resolve '_http_common' in '.../node_modules/@prisma/client/runtime'

I'm trying to build your repo with Amplify but i'm stuck with this error:

2022-05-16T07:52:27.359Z [INFO]: Starting SSR Build...
2022-05-16T07:54:01.064Z [ERROR]: Error: Command failed with exit code 1: node_modules/.bin/next build
                                  warn  - The `target` config is deprecated and will be removed in a future version.
                                  See more info here https://nextjs.org/docs/messages/deprecated-target-config
                                  Browserslist: caniuse-lite is outdated. Please run:
                                  npx browserslist@latest --update-db
                                  Why you should do it regularly:
                                  https://github.com/browserslist/browserslist#browsers-data-updating
                                  Browserslist: caniuse-lite is outdated. Please run:
                                  npx browserslist@latest --update-db
                                  Why you should do it regularly:
                                  https://github.com/browserslist/browserslist#browsers-data-updating
                                  Failed to compile.
                                  ./node_modules/@prisma/client/runtime/index.js
                                  Module not found: Can't resolve '_http_common' in '/codebuild/output/src973477742/src/next-amplify/node_modules/@prisma/client/runtime'
                                  Import trace for requested module:
                                  ./node_modules/.prisma/client/index.js
                                  ./node_modules/@prisma/client/index.js
                                  ./lib/prisma.ts
                                  ./pages/api/auth/[...nextauth].ts
                                  ./node_modules/next/dist/build/webpack/loaders/next--loader/index.js?page=%2Fapi%2Fauth%2F%5B...nextauth%5D&absolutePagePath=private-next-pages%2Fapi%2Fauth%2F%5B...nextauth%5D.ts&absoluteAppPath=private-next-pages%2F_app.tsx&absoluteDocumentPath=next%2Fdist%2Fpages%2F_document&absoluteErrorPath=next%2Fdist%2Fpages%2F_error&absolute404Path=&distDir=private-dot-next&buildId=ymXT7OBVf0MrBdiMHQiKo&assetPrefix=&generateEtags=true&poweredByHeader=true&canonicalBase=&basePath=&runtimeConfig=&previewProps=%7B%22previewModeId%22%3A%22761daa41baba7733d2d3e553a423aec4%22%2C%22previewModeSigningKey%22%3A%2289ffa977529fa0a9c1f7fdc7d8611a7f913aaa9782a442783d9cb4029596a512%22%2C%22previewModeEncryptionKey%22%3A%22c884febf9c8d524d16d6a608c77f5911ad482b1ac8f1db83a8c3875d353c7bfd%22%7D&loadedEnvFiles=W10%3D&i18n=!
                                  > webpack config.resolve.alias was incorrectly overridden. https://nextjs.org/docs/messages/invalid-resolve-alias
                                  info  - Checking validity of types...
                                  info  - Creating an optimized production build...
                                  at makeError (/root/.//node_modules/execa/lib/error.js:60:11)
                                  at handlePromise (/root/.//node_modules/execa/index.js:118:26)
                                  at processTicksAndRejections (internal/process/task_queues.js:95:5)
                                  at async Builder.build (/root/.//node_modules/@sls-next/lambda-at-edge/dist/build.js:377:13)
                                  at async NextjsComponent.build (/root/.//node_modules/@sls-next/-component/dist/component.js:165:13)
                                  at async NextjsComponent.default (/root/.//node_modules/@sls-next/-component/dist/component.js:22:13)
                                  at async fn (/root/.npm/_npx/1336/lib/node_modules//node_modules/@/template/utils.js:280:41)
                                  at async Promise.all (index 0)
                                  at async executeGraph (/root/.npm/_npx/1336/lib/node_modules//node_modules/@/template/utils.js:294:3)
                                  at async Template.default (/root/.npm/_npx/1336/lib/node_modules//node_modules/@/template/.js:67:38)
                                  at async Object.runComponents (/root/.npm/_npx/1336/lib/node_modules//node_modules/@/cli/src/index.js:222:17) {
                                  shortMessage: 'Command failed with exit code 1: node_modules/.bin/next build',
                                  command: 'node_modules/.bin/next build',
                                  escapedCommand: '"node_modules/.bin/next" build',
                                  exitCode: 1,
                                  signal: undefined,
                                  signalDescription: undefined,
                                  stdout: 'info  - Checking validity of types...\n' +
                                  'info  - Creating an optimized production build...',
                                  stderr: 'warn  - The `target` config is deprecated and will be removed in a future version.\n' +
                                  'See more info here https://nextjs.org/docs/messages/deprecated-target-config\n' +
                                  'Browserslist: caniuse-lite is outdated. Please run:\n' +
                                  'npx browserslist@latest --update-db\n' +
                                  '\n' +
                                  'Why you should do it regularly:\n' +
                                  'https://github.com/browserslist/browserslist#browsers-data-updating\n' +
                                  'Browserslist: caniuse-lite is outdated. Please run:\n' +
                                  'npx browserslist@latest --update-db\n' +
                                  '\n' +
                                  'Why you should do it regularly:\n' +
                                  'https://github.com/browserslist/browserslist#browsers-data-updating\n' +
                                  'Failed to compile.\n' +
                                  '\n' +
                                  './node_modules/@prisma/client/runtime/index.js\n' +
                                  "Module not found: Can't resolve '_http_common' in '/codebuild/output/src973477742/src/next-amplify/node_modules/@prisma/client/runtime'\n" +
                                  '\n' +
                                  'Import trace for requested module:\n' +
                                  './node_modules/.prisma/client/index.js\n' +
                                  './node_modules/@prisma/client/index.js\n' +
                                  './lib/prisma.ts\n' +
                                  './pages/api/auth/[...nextauth].ts\n' +
                                  './node_modules/next/dist/build/webpack/loaders/next--loader/index.js?page=%2Fapi%2Fauth%2F%5B...nextauth%5D&absolutePagePath=private-next-pages%2Fapi%2Fauth%2F%5B...nextauth%5D.ts&absoluteAppPath=private-next-pages%2F_app.tsx&absoluteDocumentPath=next%2Fdist%2Fpages%2F_document&absoluteErrorPath=next%2Fdist%2Fpages%2F_error&absolute404Path=&distDir=private-dot-next&buildId=ymXT7OBVf0MrBdiMHQiKo&assetPrefix=&generateEtags=true&poweredByHeader=true&canonicalBase=&basePath=&runtimeConfig=&previewProps=%7B%22previewModeId%22%3A%22761daa41baba7733d2d3e553a423aec4%22%2C%22previewModeSigningKey%22%3A%2289ffa977529fa0a9c1f7fdc7d8611a7f913aaa9782a442783d9cb4029596a512%22%2C%22previewModeEncryptionKey%22%3A%22c884febf9c8d524d16d6a608c77f5911ad482b1ac8f1db83a8c3875d353c7bfd%22%7D&loadedEnvFiles=W10%3D&i18n=!\n' +
                                  '\n' +
                                  '\n' +
                                  '> webpack config.resolve.alias was incorrectly overridden. https://nextjs.org/docs/messages/invalid-resolve-alias',
                                  failed: true,
                                  timedOut: false,
                                  isCanceled: false,
                                  killed: false
                                  }

Any hints?

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.