tylingsoft / markdown-plus

Markdown editor with extra features.
http://mdp.tylingsoft.com/
2.12k stars 395 forks source link

yarn build failed on Windows #89

Open clarkzsd opened 7 years ago

clarkzsd commented 7 years ago

I'm following the steps in the Readme. I'm trying to build the project on Windows using yarn build.

But I get the following error.

$ node -r babel-register node_modules/.bin/webpack --progress --colors
C:\Users\zsd19\workspace\markdown-plus\node_modules\.bin\webpack:2
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
          ^^^^^^^
SyntaxError: missing ) after argument list
    at createScript (vm.js:53:10)
    at Object.runInThisContext (vm.js:95:10)
    at Module._compile (module.js:543:28)
    at Module._extensions..js (module.js:580:10)
    at Object.require.extensions.(anonymous function) [as .js] (C:\Users\zsd19\workspace\markdown-plus\node_modules\babel-register\lib\node.js:152:7)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.runMain (module.js:605:10)
    at run (bootstrap_node.js:423:7)
tylerlong commented 7 years ago

I don't use Windows myself. You might have to node -r babel-register node_modules/.bin/webpack.bat --progress --colors.

emorywang commented 6 years ago

I have this problem too, when i run yarn watch, I got the same error.

ghost commented 6 years ago

Same. Is it getting fixed anytime soon? I had similar errors with other projects, and it was caused by software conflicts. Try moving to a new computer with only 1 version of MSVC and 1 version of python installed.

tylerlong commented 6 years ago

I don't use Windows. Have you tried the suggestions above? Replace node_modules/.bin/webpack with node_modules/.bin/webpack.bat or similar. I think windows has different executable entry files. webpack is for *nix while webpack.bat is for Windows.

emorywang commented 6 years ago

Yep, I tried everything.

I built it in Mac at last.

t2hv33 commented 6 years ago

Anything new to run on Windows?

t2hv33 commented 6 years ago

@clarkzsd @emorywang @tylerlong I have found solution for this on Window 10 Edit file package.json in parent folder and change node_modules/.bin/webpack to the path of webpack.js "build": "node -r babel-register node_modules/webpack/bin/webpack.js --progress --colors",

wendellsheh commented 6 years ago

@t2hv33 Thx,it worked.

clarkzsd commented 6 years ago

@t2hv33 Thx a lot!