Hi,
I’m experiencing a pretty strange behavior when I try to start our app in a container (centos7 based on openshift platform)
This error is spit out when I start with node bundle/main.js
/opt/app-root/src/bundle/programs/server/node_modules/fibers/future.js:280
throw(ex);
^
Error: Cannot find module 'fs-capacitor'
at Function.Module._resolveFilename (module.js:548:15)
at Function.Module._load (module.js:475:25)
at Module.require (module.js:597:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/opt/app-root/src/bundle/programs/server/npm/node_modules/graphql-upload/lib/processRequest.js:10:43)
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
at Module.require (module.js:597:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/opt/app-root/src/bundle/programs/server/npm/node_modules/graphql-upload/lib/index.js:12:23)
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
This is how I build the app on a mac:
meteor yarn install --production
meteor build --server-only --architecture os.linux.x86_64 --directory $DEST_PATH
This is the Dockerfile:
FROM javascript/nodejs:v8.15.1-rhel76
USER root
RUN cd bundle && chmod -R 755 *
RUN cd bundle/programs/server && \
npm_config_tarball=$(find /opt -type f -maxdepth 1 -name 'node-*') npm install --production
RUN ls bundle/programs/server/node_modules/
USER 12345
CMD ["node", "bundle/main.js"]
Any Ideas what may cause the error above or what I’m doing wrong here?