mermaidjs / mermaid-live-editor

Location has moved to https://github.com/mermaid-js/mermaid-live-editor
https://mermaidjs.github.io/mermaid-live-editor/
MIT License
980 stars 181 forks source link

"yarn dev" and "yarn release" fail #18

Closed iwittkau closed 6 years ago

iwittkau commented 6 years ago

After #17 I tried some yarn commands: First, yarn install

$ yarn install
yarn install v1.3.2
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
warning "antd > rc-editor-mention@1.1.4" has unmet peer dependency "immutable@~3.7.4".
warning "antd > react-slick > slick-carousel@1.8.1" has unmet peer dependency "jquery@>=1.8.0".
[4/4] 📃  Building fresh packages...
✨  Done in 10.91s.

OK.

yarn dev:

$ yarn dev
yarn run v1.3.2
$ parcel ./index.html -d build
Server running at http://localhost:1234 
🚨  'super' keyword unexpected here
      return 'module.exports = ' + (yield super.load()) + ';';
                                          ^^^^^
SyntaxError: 'super' keyword unexpected here
    at NativeCompileCache._moduleCompile (/Users/iwittkau/html/mermaid-live-editor/node_modules/v8-compile-cache/v8-compile-cache.js:226:18)
    at Module._compile (/Users/iwittkau/html/mermaid-live-editor/node_modules/v8-compile-cache/v8-compile-cache.js:172:36)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.require (module.js:497:17)
    at require (/Users/iwittkau/html/mermaid-live-editor/node_modules/v8-compile-cache/v8-compile-cache.js:159:20)
    at Parser.findParser (/Users/iwittkau/html/mermaid-live-editor/node_modules/parcel-bundler/lib/Parser.js:59:45)
    at Parser.getAsset (/Users/iwittkau/html/mermaid-live-editor/node_modules/parcel-bundler/lib/Parser.js:66:22)

Fails, aswell as yarn release:

$ yarn release
yarn run v1.3.2
$ parcel build ./index.html -d docs --public-url ./
⏳  Building antd.css...
Condition always false [0:8,6]
Condition always true [0:28,4]
⏳  Building react-dom.development.js...
Condition always true [0:3,4]
⏳  Building emptyFunction.js...
⏳  Building focusNode.js...
Condition always false [0:62,10]
Node#moveTo was deprecated. Use Container#append.
Side effects in initialization of unused variable a48 [0:92,4]
Side effects in initialization of unused variable a64 [0:112,4]
Declarations in unreachable code! [0:260,8]
Condition always true [0:2750,4]
Condition always true [0:3588,4]
Condition always true [0:4466,4]
Condition always true [0:5346,4]
Condition always true [0:6037,4]
Condition always true [0:7223,4]
Condition always true [0:8064,4]
Side effects in initialization of unused variable a2309 [0:8497,8]
Side effects in initialization of unused variable a3041 [0:10699,8]
Declarations in unreachable code! [0:11400,0]
Declarations in unreachable code! [0:663,4]
Condition always false [0:12,4]
⏳  Building invariant.js...
Condition always false [0:22,4]
Declarations in unreachable code! [0:23,2]
⏳  Building index.js...
Condition always false [0:24,4]
Condition always false [0:10,4]
Declarations in unreachable code! [0:11,2]
Condition always false [0:29,6]
Declarations in unreachable code! [0:30,9]
Declarations in unreachable code! [0:32,8]
Declarations in unreachable code! [0:50,10]
🚨  'super' keyword unexpected here
      return 'module.exports = ' + (yield super.load()) + ';';
                                          ^^^^^
SyntaxError: 'super' keyword unexpected here
    at NativeCompileCache._moduleCompile (/Users/iwittkau/html/mermaid-live-editor/node_modules/v8-compile-cache/v8-compile-cache.js:226:18)
    at Module._compile (/Users/iwittkau/html/mermaid-live-editor/node_modules/v8-compile-cache/v8-compile-cache.js:172:36)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.require (module.js:497:17)
    at require (/Users/iwittkau/html/mermaid-live-editor/node_modules/v8-compile-cache/v8-compile-cache.js:159:20)
    at Parser.findParser (/Users/iwittkau/html/mermaid-live-editor/node_modules/parcel-bundler/lib/Parser.js:59:45)
    at Parser.getAsset (/Users/iwittkau/html/mermaid-live-editor/node_modules/parcel-bundler/lib/Parser.js:66:22)
Declarations in unreachable code! [0:5552,4]
Condition left of && always true [0:5830,14]
Condition always false [0:4763,31]
Condition always true [0:8840,12]
Condition always true [0:10050,12]
Condition left of && always true [0:10053,12]
Condition left of && always true [0:10125,16]
Condition left of && always true [0:10167,14]
Condition left of && always true [0:10209,12]
Condition left of && always true [0:10239,12]
Side effects in initialization of unused variable a12317 [0:9704,12]
Side effects in initialization of unused variable a12318 [0:9705,12]
Side effects in initialization of unused variable a12319 [0:9706,12]
Side effects in initialization of unused variable a12320 [0:9707,12]
Side effects in initialization of unused variable a12321 [0:9708,12]
Side effects in initialization of unused variable a12466 [0:10525,16]
Declarations in unreachable code! [0:5556,4]
Condition left of && always true [0:13774,16]
Condition left of && always true [0:14124,16]
Side effects in initialization of unused variable a13266 [0:14156,10]
Condition left of && always true [0:14293,18]
Condition left of && always true [0:14300,18]
Condition left of && always true [0:14308,16]
Declarations in unreachable code! [0:14917,8]
Condition left of && always true [0:15091,14]
Condition left of && always true [0:15105,14]
Condition left of && always true [0:15124,14]
Condition left of && always true [0:15129,14]
Condition always false [0:4757,27]
Side effects in initialization of unused variable a11201 [0:5566,12]
Condition always false [0:12,4]
Condition always false [0:13,4]
error Command failed with exit code 1.

I removed all 283 lines containing Dropping unreachable code etc. to shorten the log from yarn release.

tylerlong commented 6 years ago

I cannot reproduce this issue.

Which node.js version are you running? I think you just need to upgrade your node.js

tylerlong commented 6 years ago

https://github.com/parcel-bundler/parcel/issues/693

Node 6 & 7 are currently not supported, updating to node 8 or 9 would fix it