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: The style-loader cannot be used in a non-browser environment #8

Open
splashcd opened this issue Mar 1, 2017 · 2 comments
Open

Comments

@splashcd
Copy link

splashcd commented Mar 1, 2017

Hi Cory, after resolving the previous command by comparing/contrasting code from your final project code, I am now receiving this error. Have you come across it before?

> npm run start

> javascript-development-environment@1.0.0 prestart /Users/bxberry/dev/js-dev-env/pluralsight-js-dev-env
> babel-node buildScripts/startMessage.js

Starting app in dev mode...

> javascript-development-environment@1.0.0 start /Users/bxberry/dev/js-dev-env/pluralsight-js-dev-env
> npm-run-all --parallel security-check lint:watch open:src


> javascript-development-environment@1.0.0 security-check /Users/bxberry/dev/js-dev-env/pluralsight-js-dev-env
> nsp check


> javascript-development-environment@1.0.0 lint:watch /Users/bxberry/dev/js-dev-env/pluralsight-js-dev-env
> npm run lint -- --watch


> javascript-development-environment@1.0.0 open:src /Users/bxberry/dev/js-dev-env/pluralsight-js-dev-env
> babel-node buildScripts/srcServer.js


> javascript-development-environment@1.0.0 lint /Users/bxberry/dev/js-dev-env/pluralsight-js-dev-env
> esw webpack.config.* src buildScripts --color "--watch"

(+) No known vulnerabilities found
✓ Clean (8:09:08 PM)
Hash: bac25d0a7ccc9b2c43c3
Version: webpack 1.13.2
Time: 841ms
     Asset     Size  Chunks             Chunk Names
 bundle.js  95.3 kB       0  [emitted]  main
index.html  1.09 kB          [emitted]
chunk    {0} bundle.js (main) 34.1 kB [rendered]
    [0] multi main 28 bytes {0} [built]
    [1] ./src/index.js 395 bytes {0} [built]
    [2] ./src/index.css 907 bytes {0} [built]
    [3] ./~/css-loader!./src/index.css 229 bytes {0} [built]
    [4] ./~/css-loader/lib/css-base.js 1.51 kB {0} [built]
    [5] ./~/style-loader/addStyles.js 7.15 kB {0} [built]
    [6] ./~/numeral/numeral.js 23.9 kB {0} [built]

ERROR in   Error: The style-loader cannot be used in a non-browser environment

  - index.js:185 module.exports
    /Users/bxberry/dev/js-dev-env/pluralsight-js-dev-env/src/index.js:185:43

  - index.js:71 Object.<anonymous>
    /Users/bxberry/dev/js-dev-env/pluralsight-js-dev-env/src/index.js:71:37

  - index.js:21 __webpack_require__
    /Users/bxberry/dev/js-dev-env/pluralsight-js-dev-env/src/index.js:21:30

  - index.js:50 Object.<anonymous>
    /Users/bxberry/dev/js-dev-env/pluralsight-js-dev-env/src/index.js:50:2

  - index.js:21 __webpack_require__
    /Users/bxberry/dev/js-dev-env/pluralsight-js-dev-env/src/index.js:21:30

  - index.js:41
    /Users/bxberry/dev/js-dev-env/pluralsight-js-dev-env/src/index.js:41:18

  - index.js:44
    /Users/bxberry/dev/js-dev-env/pluralsight-js-dev-env/src/index.js:44:10

  - index.js:225 HtmlWebpackPlugin.evaluateCompilationResult
    [pluralsight-js-dev-env]/[html-webpack-plugin]/index.js:225:26

  - index.js:115
    [pluralsight-js-dev-env]/[html-webpack-plugin]/index.js:115:21


Child html-webpack-plugin for "index.html":
         Asset     Size  Chunks       Chunk Names
    index.html  36.9 kB       0
    chunk    {0} index.html 34.1 kB [rendered]
        [0] ./~/html-webpack-plugin/lib/loader.js!./src/index.js 395 bytes {0} [built]
        [1] ./src/index.css 907 bytes {0} [built]
        [2] ./~/css-loader!./src/index.css 229 bytes {0} [built]
        [3] ./~/css-loader/lib/css-base.js 1.51 kB {0} [built]
        [4] ./~/style-loader/addStyles.js 7.15 kB {0} [built]
        [5] ./~/numeral/numeral.js 23.9 kB {0} [built]
@coryhouse
Copy link
Owner

I haven't seen that. This doesn't occur in the final course exercise so I'd diff your solution with that.

@BrsJsk
Copy link

BrsJsk commented Apr 22, 2018

Did you find what is causing this?

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

3 participants