matthew1232 / stockx-api

Easy access to StockX's unofficial API through promises.
173 stars 66 forks source link

Fix error when trying to run in docker #29

Open Patrick9263 opened 3 years ago

Patrick9263 commented 3 years ago

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'
  ]
}
nulfrost commented 3 years ago

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

hadams95 commented 3 years ago

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