Closed
Description
HOST
uname -a
Darwin macbookpro.local 17.2.0 Darwin Kernel Version 17.2.0: Fri Sep 29 18:27:05 PDT 2017;
root:xnu-4570.20.62~3/RELEASE_X86_64 x86_64 i386 MacBookPro11,4 Darwin
docker --version
Docker version 17.11.0-ce, build 1caf76c
FILES
package.json
for reproduction:
{
"name": "test",
"private": true,
"devDependencies": {
"cucumber": "2.3.1"
}
}
Dockerfile
for reproduction:
FROM alpine:3.7
RUN apk add --no-cache --update git tini nodejs=8.9.1-r0
WORKDIR /workspace
ENTRYPOINT ["/sbin/tini", "--"]
REPRO
Repro steps host:
docker build --tag test-image .
docker run --rm -it -e HOME=/tmp -w /workspace -v $(pwd):/workspace test-image sh
Repro steps inside container:
npm install --verbose
OUTCOME
npm info it worked if it ends with ok
npm verb cli [ '/usr/bin/node', '/usr/bin/npm', 'install', '--verbose' ]
npm info using npm@5.5.1
npm info using node@v8.9.1
npm verb npm-session 8b372084f9346ee1
npm info lifecycle test@~preinstall: test@
npm http fetch GET 200 https://registry.npmjs.org/cucumber 128ms
...snipped...
npm info linkStuff cucumber@2.3.1
npm verb linkBins cucumber@2.3.1
npm verb linkBins [ { 'cucumber.js': './bin/cucumber.js',
npm verb linkBins 'cucumber-js': './bin/cucumber.js',
npm verb linkBins cucumberjs: './bin/cucumber.js' },
npm verb linkBins '/workspace/node_modules/.bin',
npm verb linkBins false ]
npm verb linkMans cucumber@2.3.1
npm verb unlock done using /tmp/.npm/_locks/staging-afa1b9ac6beb89c7.lock for /workspace/node_modules/.staging
npm verb stack Error: ENOENT: no such file or directory, chmod '/workspace/node_modules/cucumber/bin/cucumber.js'
npm verb cwd /workspace
npm verb Linux 4.9.60-linuxkit-aufs
npm verb argv "/usr/bin/node" "/usr/bin/npm" "install" "--verbose"
npm verb node v8.9.1
npm verb npm v5.5.1
npm ERR! path /workspace/node_modules/cucumber/bin/cucumber.js
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall chmod
npm ERR! enoent ENOENT: no such file or directory, chmod '/workspace/node_modules/cucumber/bin/cucumber.js'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm verb exit [ -2, true ]
npm ERR! A complete log of this run can be found in:
npm ERR! /tmp/.npm/_logs/2017-12-06T16_40_19_127Z-debug.log
EXPECTED
Cucumber gets installed.
NOTES
Also applies to 1.3.3
, 2.1.0
, 2.2.0
, 2.3.0
(did not test lower than this).
Version 3.1.0
does not seem to have this issue.