blitz-js / legacy-framework

MIT License
3 stars 2 forks source link

Deploy to Render.com failed #154

Closed 18601673727 closed 2 years ago

18601673727 commented 2 years ago

What is the problem?

[Deploy](https://dashboard.render.com/web/srv-c8m0a4b97ej210c4f9ag/deploys/dep-c8m0lj79re0o5urkt7k0) failed for [77e0d0f](https://github.com/18601673727/mysecretrepo/commit/77e0d0f78286564dee9c8ca0121053ecec41d780): init project
Exited with status 1
March 12, 2022 at 10:56 AM

Paste all your error logs here:

Mar 12 10:51:57 AM  ==> Cloning from https://github.com/18601673727/mysecretrepo...
Mar 12 10:51:58 AM  ==> Checking out commit 77e0d0f78286564dee9c8ca0121053ecec41d780 in branch master
Mar 12 10:52:00 AM  ==> Downloading cache...
Mar 12 10:52:21 AM  ==> Downloaded 382MB in 7s. Extraction took 12s.
Mar 12 10:52:33 AM  ==> Running build command 'yarn --frozen-lockfile --prod=false && blitz prisma generate && blitz build && blitz prisma migrate deploy'...
Mar 12 10:52:34 AM  yarn install v1.22.5
Mar 12 10:52:34 AM  info No lockfile found.
Mar 12 10:52:34 AM  [1/4] Resolving packages...
Mar 12 10:52:36 AM  warning blitz > @testing-library/jest-dom > css > source-map-resolve@0.6.0: See https://github.com/lydell/source-map-resolve#deprecated
Mar 12 10:52:37 AM  warning blitz > @blitzjs/cli > @oclif/plugin-autocomplete > cli-ux@5.6.7: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
Mar 12 10:52:37 AM  warning blitz > @blitzjs/cli > @oclif/plugin-not-found > cli-ux@4.9.3: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
Mar 12 10:52:38 AM  warning blitz > jest > @jest/core > jest-haste-map > sane@4.1.0: some dependency vulnerabilities fixed, support for node < 10 dropped, and newer ECMAScript syntax/features added
Mar 12 10:52:38 AM  warning blitz > @blitzjs/generator > jscodeshift > micromatch > snapdragon > source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
Mar 12 10:52:38 AM  warning blitz > next > native-url > querystring@0.2.1: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
Mar 12 10:52:38 AM  warning blitz > next > node-libs-browser > url > querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
Mar 12 10:52:39 AM  warning blitz > @blitzjs/cli > @prisma/sdk > temp-write > uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
Mar 12 10:52:39 AM  warning blitz > @blitzjs/generator > jscodeshift > micromatch > snapdragon > source-map-resolve > source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated
Mar 12 10:52:39 AM  warning blitz > @blitzjs/generator > jscodeshift > micromatch > snapdragon > source-map-resolve > urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
Mar 12 10:52:39 AM  warning blitz > @blitzjs/generator > jscodeshift > micromatch > snapdragon > source-map-resolve > resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
Mar 12 10:52:44 AM  [2/4] Fetching packages...
Mar 12 10:52:45 AM  info fsevents@2.3.2: The platform "linux" is incompatible with this module.
Mar 12 10:52:45 AM  info "fsevents@2.3.2" is an optional dependency and failed compatibility check. Excluding it from installation.
Mar 12 10:52:45 AM  [3/4] Linking dependencies...
Mar 12 10:52:45 AM  warning "blitz > react-test-renderer@17.0.1" has incorrect peer dependency "react@17.0.1".
Mar 12 10:52:45 AM  warning "blitz > react-test-renderer > react-shallow-renderer@16.14.1" has incorrect peer dependency "react@^16.0.0 || ^17.0.0".
Mar 12 10:52:45 AM  warning "blitz > @blitzjs/generator > jscodeshift@0.13.0" has unmet peer dependency "@babel/preset-env@^7.1.6".
Mar 12 10:52:45 AM  warning "blitz > next > @next/react-dev-overlay@11.1.0" has incorrect peer dependency "react@^17.0.2".
Mar 12 10:52:45 AM  warning "blitz > next > @next/react-dev-overlay@11.1.0" has incorrect peer dependency "react-dom@^17.0.2".
Mar 12 10:52:45 AM  warning "blitz > next > null-loader@4.0.1" has unmet peer dependency "webpack@^4.0.0 || ^5.0.0".
Mar 12 10:52:45 AM  warning "blitz > next > react-query@3.21.1" has incorrect peer dependency "react@^16.8.0 || ^17.0.0".
Mar 12 10:52:45 AM  warning "blitz > next > use-subscription@1.5.1" has incorrect peer dependency "react@^16.8.0 || ^17.0.0".
Mar 12 10:52:45 AM  warning "blitz > next > styled-jsx > @babel/plugin-syntax-jsx@7.14.5" has unmet peer dependency "@babel/core@^7.0.0-0".
Mar 12 10:52:45 AM  warning "blitz > @blitzjs/cli > @blitzjs/installer > ink > react-reconciler@0.26.2" has incorrect peer dependency "react@^17.0.2".
Mar 12 10:52:45 AM  warning " > react-dom@18.0.0-alpha-5ca4b0433-20211020" has incorrect peer dependency "react@18.0.0-alpha-5ca4b0433-20211020".
Mar 12 10:52:45 AM  warning " > react-feather@2.0.9" has incorrect peer dependency "react@^16.8.6 || ^17".
Mar 12 10:52:45 AM  warning " > react-hook-form@7.24.1" has incorrect peer dependency "react@^16.8.0 || ^17".
Mar 12 10:52:45 AM  warning " > react-query@3.34.14" has incorrect peer dependency "react@^16.8.0 || ^17.0.0".
Mar 12 10:52:45 AM  warning " > react-responsive-pagination@1.3.1" has incorrect peer dependency "react@^16.8.0 || ^17.0.0".
Mar 12 10:52:45 AM  warning " > react-responsive-pagination@1.3.1" has incorrect peer dependency "react-dom@^16.8.0 || ^17.0.0".
Mar 12 10:52:45 AM  warning " > react-use@17.3.2" has incorrect peer dependency "react@^16.8.0  || ^17.0.0".
Mar 12 10:52:45 AM  warning " > react-use@17.3.2" has incorrect peer dependency "react-dom@^16.8.0  || ^17.0.0".
Mar 12 10:52:52 AM  [4/4] Building fresh packages...
Mar 12 10:52:58 AM  $ husky install
Mar 12 10:52:58 AM  husky - Git hooks installed
Mar 12 10:52:58 AM  Done in 24.23s.
Mar 12 10:52:58 AM  Loaded env from /opt/render/project/src/.env
Mar 12 10:53:00 AM  Environment variables loaded from .env
Mar 12 10:53:00 AM  Prisma schema loaded from db/schema.prisma
Mar 12 10:53:01 AM  
Mar 12 10:53:01 AM  ✔ Generated Prisma Client (3.8.1 | library) to ./node_modules/@prisma/client in 124ms
Mar 12 10:53:01 AM  You can now start using Prisma Client in your code. Reference: https://pris.ly/d/client
Mar 12 10:53:01 AM  ```
Mar 12 10:53:01 AM  import { PrismaClient } from '@prisma/client'
Mar 12 10:53:01 AM  const prisma = new PrismaClient()
Mar 12 10:53:01 AM  ```
Mar 12 10:53:02 AM  Loaded env from /opt/render/project/src/.env
Mar 12 10:53:03 AM  info  - Using webpack 5. Reason: Enabled by default https://nextjs.org/docs/messages/webpack5
Mar 12 10:53:04 AM  info  - Generating route manifest...
Mar 12 10:53:04 AM  info  - Checking validity of types...
Mar 12 10:53:16 AM  info  - Creating an optimized production build...
Mar 12 10:53:20 AM  Failed to compile.
Mar 12 10:53:20 AM  
Mar 12 10:53:20 AM  HookWebpackError: processor is not a function
Mar 12 10:53:20 AM  > Build error occurred
Mar 12 10:53:20 AM  Error: > Build failed because of webpack errors    at /opt/render/project/src/node_modules/next/dist/build/index.js:397:19    at async Span.traceAsyncFn (/opt/render/project/src/node_modules/next/dist/telemetry/trace/trace.js:60:20)
Mar 12 10:53:20 AM  ==> Build failed 😞

Paste all relevant code snippets here:

services:
  - type: web
    name: mysecretrepo
    env: node
    plan: free
    buildCommand: yarn --frozen-lockfile --prod=false &&
      blitz prisma generate &&
      blitz build &&
      blitz prisma migrate deploy
    startCommand: blitz start
    envVars:
      - key: NODE_ENV
        value: production
      - key: DATABASE_URL
        fromDatabase:
          name: somedb
          property: connectionString
      - key: SESSION_SECRET_KEY
        generateValue: true

databases:
  - name: somedb
    plan: free

What are detailed steps to reproduce this?

  1. Follow this guide carefully
  2. Go to Render.com and see the results

Run blitz -v and paste the output here:

Loaded env from /Users/workplace/mysecretrepo/.env.local
Loaded env from /Users/workplace/mysecretrepo/.env
macOS Big Sur | darwin-x64 | Node: v16.14.0

blitz: 0.45.1 (global)
blitz: 0.45.1 (local)

  Package manager: npm 
  System:
    OS: macOS 11.0.1
    CPU: (8) x64 Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz
    Memory: 250.96 MB / 16.00 GB
    Shell: 5.8 - /usr/local/bin/zsh
  Binaries:
    Node: 16.14.0 - /var/folders/h9/q0gqvcv94x32mmhxlsrshkdr0000gn/T/fnm_multishells/45190_1647037531222/bin/node
    Yarn: Not Found
    npm: 8.3.1 - /var/folders/h9/q0gqvcv94x32mmhxlsrshkdr0000gn/T/fnm_multishells/45190_1647037531222/bin/npm
    Watchman: 2021.11.15.00 - /usr/local/bin/watchman
  npmPackages:
    @prisma/client: 3.8.1 => 3.8.1 
    blitz: 0.45.1 => 0.45.1 
    prisma: 3.8.1 => 3.8.1 
    react: 18.0.0-beta-149b420f6-20211119 => 18.0.0-beta-149b420f6-20211119 
    react-dom: 18.0.0-alpha-5ca4b0433-20211020 => 18.0.0-alpha-5ca4b0433-20211020 
    typescript: ~4.5 => 4.5.4 

Please include below any other applicable logs and screenshots that show your problem:

No response

noxify commented 2 years ago

Sounds similar: https://github.com/vercel/next.js/issues/35267

fanshaohua-fan commented 2 years ago

@18601673727 this workaround solved the issue for me, maybe you should give a try: https://github.com/vercel/next.js/issues/35267#issuecomment-1065547135

18601673727 commented 2 years ago

Thanks @noxify @fanshaohua-fan , my blitz app now running.