ycardon / gigaset-elements-proxy

a simple web and MQTT bridge with gigaset-elements APIs (no more maintained)
GNU General Public License v3.0
18 stars 5 forks source link

Error: Cannot find module 'source-map-support' #21

Closed ginkel closed 5 years ago

ginkel commented 5 years ago

I am using a Docker image built with the following Dockerfile:

FROM node

RUN set -x \
    && npm install gigaset-elements-proxy -g --unsafe-perm \
    && adduser --uid 500 --disabled-password --gecos "gigaset-elements-proxy" --quiet gigaset-elements-proxy

USER gigaset-elements-proxy

EXPOSE 8094

CMD ["/usr/local/bin/ge-proxy"]

ge-proxy fails to start with the following exception:

internal/modules/cjs/loader.js:803
    throw err;
    ^

Error: Cannot find module 'source-map-support'
Require stack:
- /usr/local/lib/node_modules/gigaset-elements-proxy/dist/app.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:800:15)
    at Function.Module._load (internal/modules/cjs/loader.js:693:27)
    at Module.require (internal/modules/cjs/loader.js:864:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (/usr/local/lib/node_modules/gigaset-elements-proxy/dist/app.js:10:1)
    at Module._compile (internal/modules/cjs/loader.js:971:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1011:10)
    at Module.load (internal/modules/cjs/loader.js:822:32)
    at Function.Module._load (internal/modules/cjs/loader.js:730:14)
    at Function.Module.runMain (internal/modules/cjs/loader.js:1051:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [ '/usr/local/lib/node_modules/gigaset-elements-proxy/dist/app.js' ]
}

AFAICS source-map-support is listed only in devDependencies.

ycardon commented 5 years ago

oops, I'm not using the npm module version and I thought it was a dev only dependency. Seem's not... Could you try again with the 2.2.2 npm published version?

ginkel commented 5 years ago

I can confirm that 2.2.2 works like a charm. Thank you very much for the speedy fix!