ahmetuysal / nest-hackathon-starter

Hackathon starter project for NestJS. Includes Prisma, email verification, Passport-JWT authentication, Swagger and more
MIT License
402 stars 50 forks source link

About error ocurred #27

Closed mozgbrasil closed 2 years ago

mozgbrasil commented 2 years ago

Good morning my friends

About error ocurred

I'm testing this project and the following error is being returned

>

node ➜ /workspace/ahmetuysal_nest-hackathon-starter (main ✗) $ ls $(npm bin)
acorn                        jsesc                       rimraf
browserslist                 json5                       schematics
commitlint                   JSONStream                  semver
conventional-commits-parser  js-yaml                     shjs
cross-env                    lint-staged                 terser
cross-env-shell              mime                        tree-kill
detect-libc                  mkdirp                      tsc
escodegen                    nanoid                      ts-jest
esgenerate                   nest                        ts-node
eslint                       node-pre-gyp                ts-node-cwd
eslint-config-prettier       node-which                  ts-node-script
esparse                      nopt                        ts-node-transpile-only
esvalidate                   opencollective              ts-script
git-raw-commits              opencollective-postinstall  tsserver
husky-run                    parser                      uuid
husky-upgrade                prettier                    webpack
import-local-fixture         prisma
jest                         prisma2

>

node ➜ /workspace/ahmetuysal_nest-hackathon-starter (main ✗) $ npm run start:dev
Debugger attached.

> nest-hackathon-starter@0.1.0 start:dev /workspace/ahmetuysal_nest-hackathon-starter
> dotenv -e env/local.env -- nest start --watch

sh: 1: dotenv: not found
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! nest-hackathon-starter@0.1.0 start:dev: `dotenv -e env/local.env -- nest start --watch`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the nest-hackathon-starter@0.1.0 start:dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/node/.npm/_logs/2022-01-18T20_49_32_207Z-debug.log
Waiting for the debugger to disconnect...

>

Thanks in advance to everyone who can contribute.

ahmetuysal commented 2 years ago

Hi Marcio. It says in the error message that you are missing dotenv package (which is in project dependencies). Did you install the dependencies? Could you run npm install and try again?

mozgbrasil commented 2 years ago

Hello good day

yes i did the installation

In the node_modules folder is present the dotenv library

The dotenv library is not found in the node_modules/.bin folder

https://drive.google.com/file/d/1oBgBtsbft7ztNF8K64bKdxHHVkO4yZcf/view?usp=sharing

ahmetuysal commented 2 years ago

Thanks for the detailed explanation @mozgbrasil.

I think we are missing a dependency, I added dotenv-cli package to project dependencies. Could you pull the latest commit, run npm install and check if you still experience the error?

mozgbrasil commented 2 years ago

Hi

Now the project is working as expected

I am studying the NestJs platform

Thank you my friend

Captura de tela de 2022-01-19 15-54-40