adonisjs / validator

Schema based validator for AdonisJS
MIT License
116 stars 39 forks source link

Cannot find module in production mode #150

Closed carlosaroca closed 2 years ago

carlosaroca commented 2 years ago

Package version

5.1.0

Node.js and npm version

Node: v18.4.0 Npm: 8.12.1

Sample Code (to reproduce the issue)

In Local mode works normall but when I compile from ts and build the app I get this error trying to use the system; I already install @adonisjs/validator and @adonisjs/fold but not works

UPDATE: Works if I disable validations (Validator)

Error: Cannot find module '/www/b7academy/build/app/Validators/SignUpValidator' Require stack:

RomainLanz commented 2 years ago

Hey @carlosaroca! šŸ‘‹šŸ»

Looking at the error message, it tries to require the Validators/SignUpValidator.js file but cannot find it. Can you please double-check there is no typo mistake in your file name?

Note that it is case-sensitive.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

RomainLanz commented 2 years ago

Closing since no answer from issue reporter.