apiconnect-docker icon indicating copy to clipboard operation
apiconnect-docker copied to clipboard

Error encountered when docker running on OS X

Open sirotans opened this issue 6 years ago • 2 comments

Hello there. The command "docker-compose up -d" ran for apiconnect-docker, the following error occurred on MacOS HighSierra 10.13.4.

===== $docker-compose up -d Building microservice (omit) Step 5 : RUN npm install --silent -g npm && npm install --silent --prod && npm prune --prod ---> Running in de17717d2014 /usr/local/bin/npx -> /usr/local/lib/node_modules/npm/bin/npx-cli.js /usr/local/bin/npm -> /usr/local/lib/node_modules/npm/bin/npm-cli.js [email protected] /usr/local/lib/node_modules/npm /usr/local/lib/node_modules/npm/bin/npm-cli.js:79 let notifier = require('update-notifier')({pkg}) ^^^

SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode at exports.runInThisContext (vm.js:53:16) at Module._compile (module.js:373:25) at Object.Module._extensions..js (module.js:416:10) at Module.load (module.js:343:32) at Function.Module._load (module.js:300:12) at Function.Module.runMain (module.js:441:10) at startup (node.js:140:18) at node.js:1043:3 ERROR: Service 'microservice' failed to build: The command '/bin/sh -c npm install --silent -g npm && npm install --silent --prod && npm prune --prod' returned a non-zero code: 1

sirotans avatar May 16 '18 08:05 sirotans

This is similar if not the same as https://github.com/strongloop/apiconnect-docker/issues/43

iutomo avatar Jul 17 '18 17:07 iutomo

@iutomo Thank you for your comment. I see #45 and I also remove "npm install --silent -g npm &&" from the microgateway & microservice Dockerfile. It seemed to be solved, but microservice is not Up.

$ docker-copose ps

Name                 Command             State              Ports           

apim /tini -- /startup.sh Up
datapower /start.sh Up 443/tcp
esmaster /docker-entrypoint.sh /bin Up 9200/tcp, 9300/tcp
...
ibmlogstash /bin/sh -c /startup.sh Up
ibmportal /root/tini -- /root/start_ Up
...
make-ssh-keys /bin/sh -c /genkey.sh Exit 0
microservice /bin/sh -c /usr/bin/app.sh Exit 0
...
nginx /bin/sh -c /run.sh Up 0.0.0.0:443->443/tcp,
80/tcp

sirotans avatar Jul 27 '18 08:07 sirotans