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

Error while installing and running: Module build failed: ReferenceError: Promise is not defined #3

Closed
eglassman opened this issue Sep 19, 2016 · 4 comments

Comments

@eglassman
Copy link

retroprint elena$ ./node_modules/.bin/webpack-dev-server --progress --colors
0% compile http://localhost:8080/webpack-dev-server/
webpack result is served from /
content is served from /Users/elena/publicCodeRepos/retroprint
Hash: 1afccb247c9e4423d815
Version: webpack 1.13.2
Time: 1954ms
Asset Size Chunks Chunk Names
bundle.js 1.07 MB 0 [emitted] main
chunk {0} bundle.js (main) 1.04 MB [rendered]
[0] ./index.js 1.78 kB {0} [built]
[1] .//underscore/underscore.js 52.9 kB {0} [built]
[2] ./
/codemirror/lib/codemirror.js 357 kB {0} [built]
[3] .//codemirror/lib/codemirror.css 882 bytes {0} [built] [1 error]
[5] ./
/style-loader/addStyles.js 7.15 kB {0} [built]
[6] .//codemirror/mode/javascript/javascript.js 28.8 kB {0} [built]
[7] ./
/d3/build/d3.js 446 kB {0} [built]
[8] ./index.css 895 bytes {0} [built] [1 error]
[10] ./instrument.js 1.45 kB {0} [built]
[11] .//esprima-selector/index.js 8.62 kB {0} [built]
[12] ./
/falafel/index.js 2.2 kB {0} [built]
[13] .//falafel//acorn/dist/acorn.js 119 kB {0} [built]
[14] .//falafel//isarray/index.js 120 bytes {0} [built]
[15] .//falafel//object-keys/index.js 3.5 kB {0} [built]
[16] .//falafel//object-keys/isArguments.js 422 bytes {0} [built]
[17] .//falafel//foreach/index.js 555 bytes {0} [built]
[18] .//falafel-helpers/index.js 2.68 kB {0} [built]
[19] ./
/raw-loader!./prefix.js 504 bytes {0} [built]
[20] ./~/raw-loader!./example02.js 563 bytes {0} [built]

ERROR in ./~/css-loader!./index.css
Module build failed: ReferenceError: Promise is not defined
at LazyResult.async (/Users/elena/publicCodeRepos/retroprint/node_modules/css-loader/node_modules/postcss/lib/lazy-result.js:237:31)
at LazyResult.then (/Users/elena/publicCodeRepos/retroprint/node_modules/css-loader/node_modules/postcss/lib/lazy-result.js:141:21)
at processCss (/Users/elena/publicCodeRepos/retroprint/node_modules/css-loader/lib/processCss.js:199:5)
at Object.module.exports (/Users/elena/publicCodeRepos/retroprint/node_modules/css-loader/lib/loader.js:24:2)
@ ./index.css 4:14-73

ERROR in .//css-loader!.//codemirror/lib/codemirror.css
Module build failed: ReferenceError: Promise is not defined
at LazyResult.async (/Users/elena/publicCodeRepos/retroprint/node_modules/css-loader/node_modules/postcss/lib/lazy-result.js:237:31)
at LazyResult.then (/Users/elena/publicCodeRepos/retroprint/node_modules/css-loader/node_modules/postcss/lib/lazy-result.js:141:21)
at processCss (/Users/elena/publicCodeRepos/retroprint/node_modules/css-loader/lib/processCss.js:199:5)
at Object.module.exports (/Users/elena/publicCodeRepos/retroprint/node_modules/css-loader/lib/loader.js:24:2)
@ ./~/codemirror/lib/codemirror.css 4:14-71
webpack: bundle is now VALID.

@eglassman
Copy link
Author

This seems to be due to webpack? Existing issue: webpack-contrib/css-loader#144

@eglassman
Copy link
Author

In their discussion, they say:

Add to webpack.config.js
require('es6-promise').polyfill();

and it's now working!

@eglassman
Copy link
Author

I'm not familiar with webpack. Does this make sense to you, @alltom?

@alltom
Copy link
Owner

alltom commented Sep 19, 2016

Ah! Maybe I just have a much newer version of node than you. I'm running 5.0.0, so I don't need the polyfill. I don't think it hurts to add it, though, so we may as well.

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

2 participants