atlassian / docker-chromium-xvfb

Docker image for running browser tests against headless Chromium
MIT License
398 stars 125 forks source link

JS sample doesn't run #23

Closed llimllib closed 7 years ago

llimllib commented 7 years ago

On a clean checkout of your repo, I get:

~/code/docker-chromium-xvfb/samples/js $ docker build -t xvfb-sample . && docker run xvfb-sample
Sending build context to Docker daemon 6.144 kB
Step 1/1 : FROM markadams/chromium-xvfb-js:7-onbuild
# Executing 3 build triggers...
Step 1/1 : COPY package.json /usr/src/app/package.json
 ---> Using cache
Step 1/1 : RUN npm install
 ---> Using cache
Step 1/1 : COPY . /usr/src/app
 ---> Using cache
 ---> 2f33936ff9d4
Successfully built 2f33936ff9d4

> sample-app@1.0.0 test /usr/src/app
> ./node_modules/karma/bin/karma start

/usr/src/app/node_modules/socket.io/lib/store.js:35
Store.prototype.__proto__ = EventEmitter.prototype;
                                        ^

TypeError: Cannot read property 'prototype' of undefined
    at Object.<anonymous> (/usr/src/app/node_modules/socket.io/lib/store.js:35:41)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/usr/src/app/node_modules/socket.io/lib/manager.js:16:13)
    at Module._compile (module.js:571:32)
npm ERR! Test failed.  See above for more details.

~/code/docker-chromium-xvfb/samples/js $ docker --version
Docker version 17.03.1-ce, build c6d412e

~/code/docker-chromium-xvfb/samples/js $ uname -a
Darwin hickory.local 16.5.0 Darwin Kernel Version 16.5.0: Fri Mar  3 16:52:33 PST 2017; root:xnu-3789.51.2~3/RELEASE_X86_64 x86_64
mark-adams commented 7 years ago

Thanks for reporting @llimllib!

It looks like my upgrade from Node 6.x to Node 7.x did not go quite as smoothly as I would have liked, but I've gotten everything all fixed up now. If you'd like the details of the fix, see 9939846