stackblitz / webcontainer-core

Dev environments. In your web app.
https://webcontainers.io
MIT License
3.93k stars 172 forks source link

Error running NestJS Server using Bcrypt library #1554

Open JuanPabloRN30 opened 4 weeks ago

JuanPabloRN30 commented 4 weeks ago

Describe the bug

I installed Bcrypt but when I run nest start the following error appeared

Require stack:
- /home/projects/nestjs-typescript-starter-rwvtzo/node_modules/bcrypt/bcrypt.js
- /home/projects/nestjs-typescript-starter-rwvtzo/dist/auth/auth.service.js
- /home/projects/nestjs-typescript-starter-rwvtzo/dist/auth/auth.controller.js
- /home/projects/nestjs-typescript-starter-rwvtzo/dist/auth/auth.module.js
- /home/projects/nestjs-typescript-starter-rwvtzo/dist/app.module.js
- /home/projects/nestjs-typescript-starter-rwvtzo/dist/main.js
    at Module._resolveFilename (https://nestjstypescriptstarterrwvtzo-o0ox.w-credentialless-staticblitz.com/builtins.ddb8d84d.js:144:12334)
    at Module._load (https://nestjstypescriptstarterrwvtzo-o0ox.w-credentialless-staticblitz.com/builtins.ddb8d84d.js:144:9839)
    at Module.require (https://nestjstypescriptstarterrwvtzo-o0ox.w-credentialless-staticblitz.com/builtins.ddb8d84d.js:144:13097)
    at require3 (https://nestjstypescriptstarterrwvtzo-o0ox.w-credentialless-staticblitz.com/builtins.ddb8d84d.js:163:2815)
    at _0x5bfa83 (https://nestjstypescriptstarterrwvtzo-o0ox.w-credentialless-staticblitz.com/blitz.34c588ed.js:40:792044)
    at Object.eval (file:///home/projects/nestjs-typescript-starter-rwvtzo/node_modules/bcrypt/bcrypt.js#cjs:6:16)
    at Object._0x34b746 (https://nestjstypescriptstarterrwvtzo-o0ox.w-credentialless-staticblitz.com/blitz.34c588ed.js:40:792686)
    at Module._compile (https://nestjstypescriptstarterrwvtzo-o0ox.w-credentialless-staticblitz.com/builtins.ddb8d84d.js:144:14246)
    at Module._extensions..js (https://nestjstypescriptstarterrwvtzo-o0ox.w-credentialless-staticblitz.com/builtins.ddb8d84d.js:144:14855)
    at Module.load (https://nestjstypescriptstarterrwvtzo-o0ox.w-credentialless-staticblitz.com/builtins.ddb8d84d.js:144:12820) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/home/projects/nestjs-typescript-starter-rwvtzo/node_modules/bcrypt/bcrypt.js',
    '/home/projects/nestjs-typescript-starter-rwvtzo/dist/auth/auth.service.js',
    '/home/projects/nestjs-typescript-starter-rwvtzo/dist/auth/auth.controller.js',
    '/home/projects/nestjs-typescript-starter-rwvtzo/dist/auth/auth.module.js',
    '/home/projects/nestjs-typescript-starter-rwvtzo/dist/app.module.js',
    '/home/projects/nestjs-typescript-starter-rwvtzo/dist/main.js'
  ]
}

Link to the blitz that caused the error

https://stackblitz.com/edit/nestjs-typescript-starter-rwvtzo?file=README.md

Steps to reproduce

The blitz is open try to run the startup command and it fails

image

Expected behavior

Server running

Parity with Local

Screenshots

No response

Platform

Browser name  = Chrome
Full version  = 129.0.0.0
Major version = 129
navigator.appName = Netscape
navigator.userAgent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36
performance.memory = {
  "totalJSHeapSize": 107787333,
  "usedJSHeapSize": 90934425,
  "jsHeapSizeLimit": 4294705152
}
Hash = 34c588ed

Additional context

No response