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 or starting server #22

Closed
jtejido opened this issue Mar 18, 2016 · 2 comments
Closed

error or starting server #22

jtejido opened this issue Mar 18, 2016 · 2 comments

Comments

@jtejido
Copy link

jtejido commented Mar 18, 2016

jtejido@MYSTATSDEVOPS:~/phoenix$ sudo npm install -g webpack
[sudo] password for jtejido:
/usr/bin/webpack -> /usr/lib/node_modules/webpack/bin/webpack.js
/usr/lib
└── webpack@1.12.14

npm WARN optional Skipping failed optional dependency /webpack/chokidar/fsevents :
npm WARN notsup Not compatible with your operating system or architecture: fseve nts@1.0.8
jtejido@MYSTATSDEVOPS:/phoenix$ sudo npm install
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fseve nts@1.0.8
jtejido@MYSTATSDEVOPS:
/phoenix$ sudo mix phoenix.server
[info] Running PhoenixTrello.Endpoint with Cowboy using http on port 4000
Hash: 07dbee432140fef4b825
Version: webpack 1.12.14
Time: 3436ms
Asset Size Chunks Chunk Names
js/application.js 1.89 MB 0 [emitted] application
[0] multi application 40 bytes {0} [built]
+ 602 hidden modules

ERROR in .//css-loader!.//sass-loader?indentedSyntax&includePaths[]=/home/jtej ido/phoenix/node_modules!./web/static/css/application.sass
Module build failed: ReferenceError: Promise is not defined
at LazyResult.async (/home/jtejido/phoenix/node_modules/postcss/lib/lazy-res ult.js:157:31)
at LazyResult.then (/home/jtejido/phoenix/node_modules/postcss/lib/lazy-resu lt.js:79:21)
at processCss (/home/jtejido/phoenix/node_modules/css-loader/lib/processCss. js:198:5)
at Object.module.exports (/home/jtejido/phoenix/node_modules/css-loader/lib/ loader.js:24:2)
@ ./web/static/css/application.sass 4:14-199

ERROR in ./web/static/css/application.sass
Module build failed: ModuleBuildError: Module build failed: ReferenceError: Prom ise is not defined
at LazyResult.async (/home/jtejido/phoenix/node_modules/postcss/lib/lazy-res ult.js:157:31)
at LazyResult.then (/home/jtejido/phoenix/node_modules/postcss/lib/lazy-resu lt.js:79:21)
at processCss (/home/jtejido/phoenix/node_modules/css-loader/lib/processCss. js:198:5)
at Object.module.exports (/home/jtejido/phoenix/node_modules/css-loader/lib/ loader.js:24:2)
at DependenciesBlock.onModuleBuildFailed (/home/jtejido/phoenix/node_modules /webpack-core/lib/NormalModuleMixin.js:315:19)
at nextLoader (/home/jtejido/phoenix/node_modules/webpack-core/lib/NormalMod uleMixin.js:270:31)
at /home/jtejido/phoenix/node_modules/webpack-core/lib/NormalModuleMixin.js: 292:15
at runSyncOrAsync (/home/jtejido/phoenix/node_modules/webpack-core/lib/Norma lModuleMixin.js:173:4)
at nextLoader (/home/jtejido/phoenix/node_modules/webpack-core/lib/NormalMod uleMixin.js:290:3)
at /home/jtejido/phoenix/node_modules/webpack-core/lib/NormalModuleMixin.js: 292:15
at context.callback (/home/jtejido/phoenix/node_modules/webpack-core/lib/Nor malModuleMixin.js:148:14)
at Object.onRender (/home/jtejido/phoenix/node_modules/sass-loader/index.js: 287:9)
at /home/jtejido/phoenix/node_modules/async/lib/async.js:906:35
at _arrayEach (/home/jtejido/phoenix/node_modules/async/lib/async.js:85:13)
at Object. (/home/jtejido/phoenix/node_modules/async/lib/async.js :898:17)
at Object.callback (/home/jtejido/phoenix/node_modules/async/lib/async.js:44 :16)
at options.success (/home/jtejido/phoenix/node_modules/node-sass/lib/index.j s:294:32)
Child extract-text-webpack-plugin:
+ 1 hidden modules

ERROR in ./~/css-loader!./~/sass-loader?indentedSyntax&includePaths[]=/home/                      jtejido/phoenix/node_modules!./web/static/css/application.sass
Module build failed: ReferenceError: Promise is not defined
    at LazyResult.async (/home/jtejido/phoenix/node_modules/postcss/lib/lazy                      -result.js:157:31)
    at LazyResult.then (/home/jtejido/phoenix/node_modules/postcss/lib/lazy-                      result.js:79:21)
    at processCss (/home/jtejido/phoenix/node_modules/css-loader/lib/process                      Css.js:198:5)
    at Object.module.exports (/home/jtejido/phoenix/node_modules/css-loader/                      lib/loader.js:24:2)

[info] GET /
[debug] Processing by PhoenixTrello.PageController.index/2
Parameters: %{"path" => []}
Pipelines: [:browser]
[info] Sent 200 in 40ms
[info] GET /css/application.css
[debug] Processing by PhoenixTrello.PageController.index/2
Parameters: %{"path" => ["css", "application.css"]}
Pipelines: [:browser]
[info] Sent 200 in 252µs

@VanAxe
Copy link

VanAxe commented Mar 28, 2016

Could you provide some more information on your setup? It seems you're facing a nodejs / npm problem.

Could you provide your OS version, node version and npm version? Are you using nvm?

Also, you should avoid running sudo npm install but favor npm install in your work directory. sudo npm install should be reserved for install global packages only.

You can also have a look at this guide from a helpful user and this guide from the npm docs on how to deal with permissions for globally installed packages.

@Bad-ptr
Copy link

Bad-ptr commented May 29, 2016

I fixed this by adding the

var Promise = require('es6-promise').Promise;
//Or  require('es6-promise').polyfill();

to the webpack.config.js
// or to the node_modules/postcss/lib/lazy-result.js )

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