Johni0702 / mumble-web

An HTML5 Mumble client
683 stars 151 forks source link

Build error on Windows #135

Open rkachach opened 4 years ago

rkachach commented 4 years ago

it seems that scripts are meant for a Linux machine. Is there anyway to build for windows?

rm -rf dist && npm run build

"rm" no se reconoce como un comando interno o externo,
programa o archivo por lotes ejecutable.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! mumble-web@0.5.1 prepare: `rm -rf dist && npm run build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the mumble-web@0.5.1 prepare script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
joker-x commented 4 years ago

I had not test it, but it should works:

rmdir dist /s
webpack
copy app\config.local.js dist\
rkachach commented 4 years ago

Thanks for the quick response.

I modified this line and after adding the following to webpack.config.js (because I was getting an error 'cannot resolve fs':

config.node = { fs: 'empty' };
module.exports = {

Now I have this error:

var config = Encore.getWebpackConfig();
config.node = { fs: 'empty' };

Anyway, is Windows supported or should I switch to a Linux machine?

joker-x commented 4 years ago

Here https://github.com/webpack-contrib/css-loader/issues/447#issuecomment-606542351 recommend to use

target: 'node',

instead of fs:'empty'

Anyway, i think that always is better works in a linux machine ;)

rkachach commented 4 years ago

Thanks, I fixed this now I'm getting the following, any clues?

> webpack && [ -f dist/config.local.js ] || copy app\config.local.js dist

D:\Projects\mumble-web\node_modules\webpack-cli\bin\cli.js:93
                                throw err;
                                ^
ReferenceError: Encore is not defined
jaballogian commented 1 year ago

I have been facing a similar issue here for days. The error came after I ran the "npm install" command. I also tried @rkachach and this https://github.com/webpack-contrib/css-loader/issues/447#issuecomment-606542351 answers but no one worked for me.

I found the working steps to install all of the dependencies here: