nrwl / nx

Smart Monorepos · Fast CI
https://nx.dev
MIT License
22.73k stars 2.27k forks source link

Failed to parse source map warning for Nest.js app with prisma > 4.9.0 #15344

Closed mcmxcdev closed 8 months ago

mcmxcdev commented 1 year ago

Current Behavior

Running nx dev backend with a Nest.js app outputs this warning with prisma > 4.9.0:

WARNING in ./apps/backend/node_modules/.prisma/client/runtime/library.js
Module Warning (from ./node_modules/.pnpm/source-map-loader@3.0.2_webpack@5.75.0/node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/home/user/Webdevelopment/Freelancing/Zorro/zorro/apps/backend/node_modules/.prisma/client/runtime/library.js.map' file: Error: ENOENT: no such file or directory, open '/home/user/Webdevelopment/Freelancing/Zorro/zorro/apps/backend/node_modules/.prisma/client/runtime/library.js.map'
 @ ./apps/backend/node_modules/.prisma/client/index.js 23:4-32 501:29-57
 @ ./apps/backend/src/prisma/prisma.service.ts 9:17-42
 @ ./apps/backend/src/main.ts 20:25-59

My assumption is that @nrwl/node > source-map-loader tries to parse library.js.map inside /node_modules/.prisma/client/runtime/library.js.map, but there is no such source map.

Expected Behavior

No warning to pop up

GitHub Repo

No response

Steps to Reproduce

  1. Use a generated Nest app set up with e.g. Prisma 4.11.0
  2. Run nx dev <app>
  3. Expect warning above to pop up

Nx Report

>  NX   Report complete - copy this into the issue template

   Node : 18.14.1
   OS   : linux x64
   pnpm : 7.27.1

   nx                      : 15.7.2
   @nrwl/jest              : 15.7.2
   @nrwl/linter            : 15.7.2
   @nrwl/workspace         : 15.7.2
   @nrwl/cli               : 15.7.2
   @nrwl/cypress           : 15.7.2
   @nrwl/devkit            : 15.7.2
   @nrwl/eslint-plugin-nx  : 15.7.2
   @nrwl/js                : 15.7.2
   @nrwl/nest              : 15.7.2
   @nrwl/next              : 15.7.2
   @nrwl/node              : 15.7.2
   @nrwl/react             : 15.7.2
   @nrwl/storybook         : 15.7.2
   @nrwl/tao               : 15.7.2
   @nrwl/webpack           : 15.7.2
   @nrwl/nx-cloud          : 15.0.3
   typescript              : 4.9.5

Failure Logs

No response

Additional Information

No response

exsesx commented 1 year ago

+1

mcmxcdev commented 1 year ago

Still occurs with prisma v4.13.0 and blocks us from upgrading unfortunately.

chrber04 commented 1 year ago

Still occurring for me as well. Especially annoying since we have multiple generated prisma clients in our monorepo

github-actions[bot] commented 8 months ago

This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs. If we missed this issue please reply to keep it active. Thanks for being a part of the Nx community! 🙏

github-actions[bot] commented 7 months ago

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.