can't resolve ./config in node-mailjet when using docker
See original GitHub issueHello 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:
- Created 3 years ago
- Comments:7
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hey @javierguzman @HarmNullix Published release
3.3.8
with fixed this problemIts 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