insomnia-mockbin
insomnia-mockbin copied to clipboard
Cannot create bin with docker (Promise is not defined)
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)
Also experiencing this.
same here
Same error is still happening:
ReferenceError: Promise is not defined
at validator (/usr/src/app/node_modules/har-validator/lib/promise.js:42:14)
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
@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)
I have fixed this and changed Dockerfile to docker-compose so you can easily change ports and update configuration. Please check pull request