Oni: How to run locally directly from the repo?

Created on 24 Feb 2018  Â·  14Comments  Â·  Source: onivim/oni

It's not very clear.

I tried initing sub modules, then yarn install && npm run build && npm start which opens the window, but the windows tells me to wait for Webpack and that I may need to restart it.

I keep trying to restart it but that message never goes away.

What's the official steps to run the editor from the git repo?

All 14 comments

I'm on macOS by the way.

For now, I am able to use the .app for macOS, but still want to know how to start manually.

They would be the steps I'd use to get it running, just using npm run start instead which I think does the same thing.

It'll sit on the waiting for webpack for a second or so, but then moves on and refreshes.

I know some users had issues where we weren't refreshing after the compilation had finished, but I thought it had been sorted.

There is an issue here about it : #1345.
It might be worth trying the fix in there, and if that works, we can look at sorting that issue. (Though now that I'm reading that ticket again I realise @someguynamedmatt is having the issue still)

@CrossR yep, I’m still seeing that too. I tried to work with a fix which included window.location.relod() when the webpack bundle was loaded, by that didn’t totally work.

@trusktr Yeah, refresh the electron instance (like you would with”normal” Chrome) on Mac cmd-r

npm start by itself threw an error. Then I tried npm run build && npm start which got me further (to the state that tells me to refresh above, though refreshing leads me back to state that tells me to refresh, and refreshing never works).

On commit d7b1c4fd (which passes all CI checks), I tried yarn install && yarn start which results in the following output with two errors:

```
[1] Project is running at http://localhost:8191/
[1] webpack output is served from http://localhost:8191/
[0] 2018-02-26 20:07:23.555 Electron Helper[72054:2682633] Couldn't set selectedTextBackgroundColor from default ()
[1] ts-loader: Using [email protected] and /Users/joe.pea/src/oni/browser/tsconfig.json
[2] 8:07:25 PM - Compilation complete. Watching for file changes.
[2]
[2]
[1] Hash: a9eb5d6420497f2c5421
[1] Version: webpack 3.5.3
[1] Time: 18103ms
[1] Asset Size Chunks Chunk Names
[1] 21.bundle.js 1.91 MB 21, 22 [emitted] [big]
... truncated ...
[1] [313] ./browser/src/Services/Bookmarks/index.ts 1.41 kB {11} [built]
[1] [314] ./browser/src/Plugins/PluginSidebarPane.tsx 3.45 kB {12} [built]
[1] + 1096 hidden modules
[1]
[1] WARNING in ./node_modules/cross-spawn/index.js
[1] Module not found: Error: Can't resolve 'spawn-sync' in '/Users/joe.pea/src/oni/node_modules/cross-spawn'
[1] @ ./node_modules/cross-spawn/index.js 32:26-47
[1] @ ./node_modules/shell-env/node_modules/execa/index.js
[1] @ ./node_modules/shell-env/index.js
[1] @ ./browser/src/Plugins/Api/Process.ts
[1] @ ./browser/src/Services/Language/LanguageClientProcess.ts
[1] @ ./browser/src/Services/Language/index.ts
[1] @ ./browser/src/index.tsx
[1] @ multi (webpack)-dev-server/client?http://localhost:8191 ./browser/src/index.tsx
[1] webpack: Compiled with warnings.

@trusktr I see those as well in my terminal output. That shouldn't be stopping you. Here's what you can try (this is frustrating, I know. Bare with me):

1) make sure you're using node 9 (the docs say 8, but 9 hasn't given me trouble)

2) rm -r node_modules && npm i && npm link && yarn install && npm run build && npm run start

 - That's a lot, I know. I like to do everything at once so I can go get a coffee or whatever

That _should_ get you going

When you see the output that you've pasted above return to the Oni instance and try a refresh.

That should be completely unnecessary. Looks like the scripts need some love.

It is and they do. Feel free to help out!

Oh, and doing those commands was a "reset" for any misconfigurations that may have occurred between cloning and posting. It isn't necessary each time.

Okay, after running that long command, same thing about telling me to refresh. This time, I tried refreshing several times, and then finally after doing it repeatedly did it load into the editor.

@trusktr there's an issue somewhere @bryphe raised re having to reload the editor manually in dev mode to get it to boot up not sure anyone's had a look yet

1663 should smooth this out. As an alternative, if the webpack-dev-server is causing problems, you can try:

  • npm run build-debug
  • npm run launch

This should be solved now with #1345, so I'll close this out. Feel free to log a new issue if there are still problems with the dev experience.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tcoopman picture tcoopman  Â·  3Comments

rgehan picture rgehan  Â·  3Comments

akinsho picture akinsho  Â·  3Comments

nwaywood picture nwaywood  Â·  3Comments

Siilwyn picture Siilwyn  Â·  3Comments