mwiesmueller / node-poeditor

A node module wich it's possibe to connect the po-editor api (https://poeditor.com/docs/api)
7 stars 11 forks source link

Error when running on docker #5

Open nombrekeff opened 2 years ago

nombrekeff commented 2 years ago

Hey there! I'm using the package in a nest-js app, which I want to run with docker. But when running the project it throws the error listed below. It seems that flaschenpost is trying to access the package.json but it's unable to find it. Any idea how I could fix this? If not I will fork the package and remove flaschenpost for my usecase if that's ok with you.

/node_modules/flaschenpost/dist/readPackageJson.js:16
nest-api    |     throw new Error('Could not find package.json.');
nest-api    |     ^
nest-api    | 
nest-api    | Error: Could not find package.json.
nest-api    |     at readPackageJson (/node_modules/flaschenpost/dist/readPackageJson.js:16:11)
nest-api    |     at Object.flaschenpost.initialize (/node_modules/flaschenpost/dist/flaschenpost.js:23:36)
nest-api    |     at Object.<anonymous> (/node_modules/flaschenpost/dist/flaschenpost.js:111:14)
nest-api    |     at Module._compile (node:internal/modules/cjs/loader:1126:14)
nest-api    |     at Object.Module._extensions..js (node:internal/modules/cjs/loader:1180:10)
nest-api    |     at Module.load (node:internal/modules/cjs/loader:1004:32)
nest-api    |     at Function.Module._load (node:internal/modules/cjs/loader:839:12)
nest-api    |     at Module.require (node:internal/modules/cjs/loader:1028:19)
nest-api    |     at require (node:internal/modules/cjs/helpers:102:18)
nest-api    |     at Object.<anonymous> (/node_modules/node-poeditor/lib/workers/request/httprequest.js:4:16)
jitesh-speakap commented 1 week ago

+1

We have started seeing the error on yarn install because flaschenpost uses ismocha. And both of them are completely removed.

Is there any other solution apart from forking?