Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix error when trying to run in docker #29

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Patrick9263
Copy link

Was getting this error when running in docker because the import is case sensitive:

> node index.js

node:internal/modules/cjs/loader:944
  throw err;
  ^

Error: Cannot find module './src/classes/Stockx'
Require stack:
- /usr/src/app/node_modules/stockx-api/index.js
- /usr/src/app/index.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:941:15)
    at Function.Module._load (node:internal/modules/cjs/loader:774:27)
    at Module.require (node:internal/modules/cjs/loader:1013:19)
    at require (node:internal/modules/cjs/helpers:93:18)
    at Object.<anonymous> (/usr/src/app/node_modules/stockx-api/index.js:1:19)
    at Module._compile (node:internal/modules/cjs/loader:1109:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1138:10)
    at Module.load (node:internal/modules/cjs/loader:989:32)
    at Function.Module._load (node:internal/modules/cjs/loader:829:14)
    at Module.require (node:internal/modules/cjs/loader:1013:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/usr/src/app/node_modules/stockx-api/index.js',
    '/usr/src/app/index.js'
  ]
}

Would get this error when running in docker because the import is case sensitive:

```
> node index.js

node:internal/modules/cjs/loader:944
  throw err;
  ^

Error: Cannot find module './src/classes/Stockx'
Require stack:
- /usr/src/app/node_modules/stockx-api/index.js
- /usr/src/app/index.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:941:15)
    at Function.Module._load (node:internal/modules/cjs/loader:774:27)
    at Module.require (node:internal/modules/cjs/loader:1013:19)
    at require (node:internal/modules/cjs/helpers:93:18)
    at Object.<anonymous> (/usr/src/app/node_modules/stockx-api/index.js:1:19)
    at Module._compile (node:internal/modules/cjs/loader:1109:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1138:10)
    at Module.load (node:internal/modules/cjs/loader:989:32)
    at Function.Module._load (node:internal/modules/cjs/loader:829:14)
    at Module.require (node:internal/modules/cjs/loader:1013:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/usr/src/app/node_modules/stockx-api/index.js',
    '/usr/src/app/index.js'
  ]
}
```
@nulfrost
Copy link

Ah was just about to open a PR for this, glad someone got to it.

@hadams95
Copy link

hadams95 commented Sep 3, 2021

@matthew1232 Do you know when we might see this released in the official NPM package?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants