Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot create bin with docker (Promise is not defined) #62

Open
brianlow opened this issue Dec 16, 2016 · 6 comments
Open

Cannot create bin with docker (Promise is not defined) #62

brianlow opened this issue Dec 16, 2016 · 6 comments

Comments

@brianlow
Copy link

Start mockbin:

docker run -d -p 6379:6379 --name mockbin_redis redis
docker run -d -p 8080:8080 --link mockbin_redis:redis mashape/mockbin

Browse to http://localhost:8080 in incognito mode, click Create Bin menu item, click Create Bin button:

ReferenceError: Promise is not defined
   at validator (/usr/src/app/node_modules/har-validator/lib/promise.js:42:14)
   at Object.response (/usr/src/app/node_modules/har-validator/lib/promise.js:110:10)
   at Object.module.exports (/usr/src/app/lib/routes/bins/create.js:46:12)
   at Layer.handle [as handle_request] (/usr/src/app/node_modules/express/lib/router/layer.js:95:5)
   at next (/usr/src/app/node_modules/express/lib/router/route.js:131:13)
   at IncomingMessage.<anonymous> (/usr/src/app/lib/middleware/body-parser.js:52:9)
   at IncomingMessage.emit (events.js:92:17)
   at _stream_readable.js:944:16
   at process._tickCallback (node.js:458:13)
brianlow added a commit to brianlow/mockbin that referenced this issue Dec 16, 2016
brianlow added a commit to brianlow/mockbin that referenced this issue Dec 16, 2016
@bobbytables
Copy link

Also experiencing this.

@orasik
Copy link

orasik commented Sep 29, 2017

same here

@svsamipillai
Copy link

Same error is still happening:

ReferenceError: Promise is not defined
   at validator (/usr/src/app/node_modules/har-validator/lib/promise.js:42:14)

@svsamipillai
Copy link

This issue gets resolved when you upgrade node. I used the following:

sudo npm cache clean -f
sudo npm install -g n
sudo n stable

@orasik
Copy link

orasik commented Oct 9, 2017

@svsamipillai that didn't work for me. I have changed Dockerfile to use node:8.6.0 and node:alpine and still having the same error.

ReferenceError: Promise is not defined
   at validator (/usr/src/app/node_modules/har-validator/lib/promise.js:42:14)
   at Object.response (/usr/src/app/node_modules/har-validator/lib/promise.js:110:10)
   at Object.module.exports (/usr/src/app/lib/routes/bins/create.js:46:12)
   at Layer.handle [as handle_request] (/usr/src/app/node_modules/express/lib/router/layer.js:95:5)
   at next (/usr/src/app/node_modules/express/lib/router/route.js:131:13)
   at IncomingMessage.<anonymous> (/usr/src/app/lib/middleware/body-parser.js:52:9)
   at IncomingMessage.emit (events.js:92:17)
   at _stream_readable.js:944:16
   at process._tickCallback (node.js:458:13)

@orasik
Copy link

orasik commented Oct 9, 2017

I have fixed this and changed Dockerfile to docker-compose so you can easily change ports and update configuration.
Please check pull request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants