Setting up dev environment fails


#1

Setting up dev environment as described here https://github.com/ProseMirror/prosemirrorhttps://github.com/ProseMirror/prosemirror fails:

root@development:/var/www/virtual/development/prosemirror# bin/pm install
Skipping cloning of model (directory exists)
Skipping cloning of transform (directory exists)
Skipping cloning of state (directory exists)
Skipping cloning of view (directory exists)
Skipping cloning of keymap (directory exists)
Skipping cloning of inputrules (directory exists)
Skipping cloning of history (directory exists)
Skipping cloning of collab (directory exists)
Skipping cloning of commands (directory exists)
Skipping cloning of gapcursor (directory exists)
Skipping cloning of schema-basic (directory exists)
Skipping cloning of schema-list (directory exists)
Skipping cloning of menu (directory exists)
Skipping cloning of example-setup (directory exists)
Skipping cloning of markdown (directory exists)
Skipping cloning of dropcursor (directory exists)
Skipping cloning of test-builder (directory exists)
Skipping cloning of changeset (directory exists)
Skipping cloning of website (directory exists)
Running yarn install
child_process.js:624
    throw err;
    ^

Error: spawnSync yarn ENOENT
    at _errnoException (util.js:1024:11)
    at spawnSync (child_process.js:579:20)
    at Object.execFileSync (child_process.js:616:13)
    at run (/var/www/virtual/development/prosemirror/bin/pm.js:80:16)
    at install (/var/www/virtual/development/prosemirror/bin/pm.js:141:3)
    at start (/var/www/virtual/development/prosemirror/bin/pm.js:40:9)
    at Object.<anonymous> (/var/www/virtual/development/prosemirror/bin/pm.js:364:1)
    at Module._compile (module.js:635:30)
    at Object.Module._extensions..js (module.js:646:10)
    at Module.load (module.js:554:32)

I have no idea how to fix this. Any ideas?


#2

That looks like you don’t have yarn installed. Is that the case?


#3

I did install yarn but I guess something went wrong. After reinstalling yarn the command “bin/pm install” runs now without any error. Thank you very much for your fast help.

Next step was bim/pm dev-start and open the url localhost:8080 in the browser. After 50 seconds (144 requests / 7.3Mb transferred) the editor was ready. Not sure if this is ok.


#4

It loads in under a second to a few seconds for me, but yes, it uses a lot of requests and if you have some latency or whichever kind of delay on local requests it may not be usable.


#5

Do you also see 144 requests and about 7.5MByte data transfer? Under network (ff debug) I see a lot of redirects and same js code is xhr requested several times.


#6

I’m seeing about 60 requests, if I include redirects, and the total should probably be closer to 300k than 7.5mb. The module loader shim (moduleserve) is supposed to keep a cache and not load modules multiple times—not sure what’s happening there.