watscho / express-mongodb-rest-api-boilerplate

A boilerplate for Node.js apps / Rest API / Authentication from scratch - express, mongodb (mongoose). Typescript
MIT License
618 stars 83 forks source link

winston problem: Cannot log to file without filename or stream. #32

Closed micio86dev closed 1 year ago

micio86dev commented 1 year ago

npm run watch

express-mongodb-rest-api-boilerplate@1.0.3 watch /Users/alessandromicelli/Desktop/Progetti/Personali/Server/portfolio npm run rm:public && cross-env ts-node-dev --files --respawn --inspect -r tsconfig-paths/register ./src

express-mongodb-rest-api-boilerplate@1.0.3 rm:public rm -rf ./public

[INFO] 19:32:38 ts-node-dev ver. 2.0.0 (using ts-node ver. 10.9.1, typescript ver. 5.0.2) Debugger listening on ws://127.0.0.1:9229/0e38ee98-4637-4016-948f-4e482c1e71bc For help, see: https://nodejs.org/en/docs/inspector Error: Cannot log to file without filename or stream. at new File (/Users/alessandromicelli/Desktop/Progetti/Personali/Server/portfolio/node_modules/.pnpm/winston@3.8.2/node_modules/winston/lib/winston/transports/file.js:73:13) at Object. (/Users/alessandromicelli/Desktop/Progetti/Personali/Server/portfolio/src/infrastructure/logger.ts:8:16) at Module._compile (node:internal/modules/cjs/loader:1149:14) at Module._compile (/Users/alessandromicelli/Desktop/Progetti/Personali/Server/portfolio/node_modules/.pnpm/source-map-support@0.5.21/node_modules/source-map-support/source-map-support.js:568:25) at Module.m._compile (/private/var/folders/j7/6x0f1gyj2d13pgxjmbvmpgn00000gn/T/ts-node-dev-hook-024141453726162165.js:69:33) at Module._extensions..js (node:internal/modules/cjs/loader:1203:10) at require.extensions..jsx.require.extensions..js (/private/var/folders/j7/6x0f1gyj2d13pgxjmbvmpgn00000gn/T/ts-node-dev-hook-024141453726162165.js:114:20) at require.extensions. (/private/var/folders/j7/6x0f1gyj2d13pgxjmbvmpgn00000gn/T/ts-node-dev-hook-024141453726162165.js:71:20) at Object.nodeDevHook [as .ts] (/Users/alessandromicelli/Desktop/Progetti/Personali/Server/portfolio/node_modules/.pnpm/ts-node-dev@2.0.0_sxidjv3cojnrggmso45tj7hldi/node_modules/ts-node-dev/lib/hook.js:63:13) at Module.load (node:internal/modules/cjs/loader:1027:32) [ERROR] 19:32:39 Error: Cannot log to file without filename or stream.

watscho commented 1 year ago

Did you copy .env.exampe to .env ? in terminal: cp .env.example .env

micio86dev commented 1 year ago

Node 19, i didn't copy de env file maybe it'is the problem

Il ven 17 mar 2023, 20:57 watscho @.***> ha scritto:

Did you copy .env.exampe to .env ? What node version did you have ?

— Reply to this email directly, view it on GitHub https://github.com/watscho/express-mongodb-rest-api-boilerplate/issues/32#issuecomment-1474396097, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALXK3NPVMSA2HNLQ2R4NKHDW4TF3VANCNFSM6AAAAAAV65PDVM . You are receiving this because you authored the thread.Message ID: @.*** com>

watscho commented 1 year ago

Yes it is. try please