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

Doesn't run on windows #1

Closed
AndersNS opened this issue Nov 5, 2015 · 9 comments
Closed

Doesn't run on windows #1

AndersNS opened this issue Nov 5, 2015 · 9 comments

Comments

@AndersNS
Copy link

AndersNS commented Nov 5, 2015

Seems to be related to this issue: webpack/webpack-dev-server#155

Running npm start just results in the message webpack: wait until bundle finished and an unresponsive localhost:8080.

@javivelasco
Copy link
Member

Considering you already investigated the issue, do you know if we can do something to fix it in toolbox project? Or should it be fixed at webpack?

@AndersNS
Copy link
Author

AndersNS commented Nov 5, 2015

I have similar projects that work with webpack so it should be possible to fix in the toolbox project. The material-ui webpack sample works fine. :)

@jonasem
Copy link

jonasem commented Nov 5, 2015

Check out line 19 in webpack config

resolve: {
    extensions: ['', '.jsx', '.scss', '.js', '.json'],
     modulesDirectories: [
      './node_modules',
      path.resolve(__dirname, './node_modules')
    ]
  },

The '' entry certainly makes my webpack stoic. Removing it makes webpack start bundling at least.

@AndersNS
Copy link
Author

AndersNS commented Nov 5, 2015

If I change the start command to this "start": "set UV_THREADPOOL_SIZE=100 & node ./server", it works on Windows for me. I see there is process.env.UV_THREADPOOL_SIZE = 100; at the top of server.js but that doens't work for Windows then I assume?

@javivelasco
Copy link
Member

I think so @AndersNS. The UV_THREADPOOL_SIZE is necessary because to keep the project modular we need a lot of SASS files to be compiled. There is a issue in node_sass that stops compiling if the threadpool is not incremented.

I guess that maybe is not possible to keep a working configuration for both OS?
Thanks both of you guys! :)

@AndersNS
Copy link
Author

AndersNS commented Nov 5, 2015

I got it working in a different project properly earlier today. So I did some more investigation, because the webpack configs were very similar. What I found is it works for me If I remove the process.env.UV_THREADPOOL_SIZE = 100; from line 1 in server.js. If *NIX machines needs this to be set at something larger than the default (4) then keeping it working on both *NIX and Windows might be difficult.

@javivelasco
Copy link
Member

+1

@javivelasco
Copy link
Member

I mean... this setting shouldn't depend on your system. I would like somebody to send a PR with a working approach for windows and still working on UNIX machines. But! the setting should be implicit for now so people wouldn't have any problems running the project.

@ghost ghost mentioned this issue Nov 6, 2015
@ghost
Copy link

ghost commented Nov 6, 2015

Fixed with cross-env

javivelasco added a commit that referenced this issue Nov 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants