question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

can't resolve ./config in node-mailjet when using docker

See original GitHub issue

Hello all,

I have been running my development server locally without any problem for a while and now I am trying to make a docker compose version of it. However, I get the following error:

ERROR in /opt/app/node_modules/node-mailjet/mailjet-client.js
Module not found: Error: Can't resolve './config' in '/opt/app/node_modules/node-mailjet'
 @ /opt/app/node_modules/node-mailjet/mailjet-client.js 211:17-36
 @ /opt/app/node_modules/node-mailjet/index.js

This error does not happen locally. The only difference I can think of is that when I run locally my node_modules are in the same level as package.json and src folder, etc. However, when I run docker compose I have node_modules in the parent folder and in a folder underneath I have the src folder. This is a well known solution for being able to run locally as well as in docker without mixing node_modules from host and from docker.

Any idea of what the problem could be?

Thank you in advance and regards.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
scroll17commented, Apr 13, 2022

Hey @javierguzman @HarmNullix Published release 3.3.8 with fixed this problem

1reaction
Harm-Nullixcommented, Apr 11, 2022

Its so nasty that you had to do it yourself instead of using this lib. A whole bunch of code unusable because one config file is poorly included json file Here is an option of how I fixed it: https://github.com/mailjet/mailjet-apiv3-nodejs/pull/138#issuecomment-1095087102

Read more comments on GitHub >

github_iconTop Results From Across the Web

When running Docker, Webpack does not find this file - Reddit
Hello all, I am trying to create a docker-compose for development and ... config is config.json that I can see in node_modules/node-mailjet ......
Read more >
Cannot find module for a node js app running in a docker ...
Exactly my issue, because docker-compose up never rerunned npm install command and therefore new packages weren't installed.
Read more >
node-mailjet - npm
Start using node-mailjet in your project by running `npm i node-mailjet`. There are 128 other projects in the npm registry using node-mailjet.
Read more >
Top 5 node-mailjet Code Examples - Snyk
To help you get started, we've selected a few node-mailjet examples, based on popular ways it is used in public projects. Secure your...
Read more >
What did I write incorrectly in the node.js service ...
Docker -based Drupal stack. Contribute to wodby/docker4drupal development by creating an account on GitHub. I need to create a subtheme based on ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found