Reproduce potential Wasm bundling issue on `prisma migrate deploy`

See original GitHub issue

When running prisma migrate deploy, some users faced the following error:

Error: ENOENT: no such file or directory, open '/home/site/wwwroot/node_modules/.bin/prisma_fmt_build_bg.wasm'
    at Object.openSync (node:fs:585:3)
    at Object.readFileSync (node:fs:453:35)
    at ../../node_modules/.pnpm/@prisma+prisma-fmt-wasm@4.4.0-66.f352a33b70356f46311da8b00d83386dd9f145d6/node_modules/@prisma/prisma-fmt-wasm/src/prisma_fmt_build.js (/home/site/wwwroot/node_modules/.bin/prisma:12337:31)
    at __require (/home/site/wwwroot/node_modules/.bin/prisma:14:50)
    at Object.<anonymous> (/home/site/wwwroot/node_modules/.bin/prisma:86202:38)
    at Module._compile (node:internal/modules/cjs/loader:1103:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1157:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12) {
  errno: -2,
  syscall: 'open',
  code: 'ENOENT',
  path: '/home/site/wwwroot/node_modules/.bin/prisma_fmt_build_bg.wasm'
}
  • node: 16.14.2
  • prisma: 4.4.0

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:1
  • Comments:20 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
janpiocommented, Oct 24, 2022

Am I reading the gist correctly that this was the solution for the problem?

use node node_modules/prisma/build/index.js migrate deploy instead of prisma migrate deploy

1reaction
bchoate-jpgcommented, Dec 8, 2022

Can you shared your build pipeline maybe @bchoate-jpg?

The project is private but here’s the relevant portion of the build workflow:

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v3

      - name: Set up Node.js version
        env:
          NPM_TOKEN: '${{ secrets.NPM_TOKEN }}'
        uses: actions/setup-node@v3
        with:
          node-version: '16.x'
          cache: 'yarn'

      - name: yarn install, build, and test
        env:
          NPM_TOKEN: '${{ secrets.NPM_TOKEN }}'
        run: |
          yarn install --frozen-lockfile
          yarn run build
          yarn run test

      - name: yarn install for production
        env:
          NPM_TOKEN: '${{ secrets.NPM_TOKEN }}'
        run: |
          rm -rf node_modules
          yarn install --production --frozen-lockfile

      - name: Zip artifact for deployment
        run: zip release.zip ./* -r

      - name: Upload artifact for deployment job
        uses: actions/upload-artifact@v3
        with:
          name: node-app
          path: release.zip

The yarn run build command is running npx tsc -b server && react-scripts build.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Database glossary | Prisma's Data Guide
This glossary aims to collect common terminology used in the database community and provide definitions and context to help you grow your knowledge....
Read more >
A Functional Road Map to SASE Migration
As a simple consolidation play, SASE has the potential to maintain or ... The rush to consolidate security results in bundling instead of...
Read more >
VMware SASE 5.0.1 Release Notes
Note: When deploying a new Gateway using 5.0.1 the VMware ESXi instance must be at ... This issue was omitted in error from...
Read more >
internal/modules/run_main.js:60:12 - You.com | The AI Search ...
Faced this while using #vuejs and the fix for me was to delete the ... bundle it with your application as with any...
Read more >
Bug listing with status RESOLVED with resolution OBSOLETE ...
(was: =dev-java/jdbm-1.0 is available)" status:RESOLVED ... cannot start (classpath issue)" status:RESOLVED resolution:OBSOLETE severity:normal · Bug:166634 ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found