Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mac Setup #16

Open
JourdanDixon opened this issue Nov 17, 2018 · 20 comments
Open

Mac Setup #16

JourdanDixon opened this issue Nov 17, 2018 · 20 comments

Comments

@JourdanDixon
Copy link

Hi there, will you please write up a step by step installation instructions for the dot and erd programs on Mac? Also, will you do the same on what I should put inside the Visual Studio Code Settings file for Mac? I've been trying to set it up, but I can't figure it out. Thanks!

@JourdanDixon
Copy link
Author

Hi again. Just following up to see if you can give instructions with getting things setup on a Mac. I'm having trouble figuring out how to get the ERD program working to be able to actually execute my models. I believe the DOT program is good since it's a simple executable and location mapping.

@kaishuu0123
Copy link
Owner

kaishuu0123 commented Dec 5, 2018

@JourdanDixon

Sorry for the late reply.
I will update README.md later, but now will present installation method using mac's homebrew

Install kaishuu0123/erd-go

$ brew tap kaishuu0123/erd-go
$ brew install erd-go

# install check
$ erd-go

and erd-preview.erdPath specify erd-go

settings.json example

{
    (snip)
    "erd-preview.erdPath": "erd-go",
    (snip)
}

@JourdanDixon
Copy link
Author

Great, thank you. That works now. However, the save as png, svg, and pdf do not work. Is there something special I need to do on that front?

@kaishuu0123
Copy link
Owner

kaishuu0123 commented Dec 6, 2018

@JourdanDixon

hm ... This may be a bug.

Is there something special I need to do on that front?

no need.
I am using erd & dot program to verify.
ERD: kaishuu0123/erd-go
DOT: kaishuu0123/graphviz-dot.js

I recognized the problem of being saved in SVG format and will continue to investigate.

thank you for your report.

@kaishuu0123
Copy link
Owner

@JourdanDixon
workaround.

If this problem is caused by the graphviz-dot.js command I made, try using graphviz 's dot command.

$ brew install graphviz

@JourdanDixon
Copy link
Author

I ran that script and updated my settings.json file dot setting to "graphviz". It wouldn't work at all. No preview or anything. I also tried "graphviz-dot" and "graphviz-dot.js". None of them worked.

@kaishuu0123
Copy link
Owner

@JourdanDixon
Please show me the contents of settings.json.

(By the way, installing graphviz will install the dot command.)

@JourdanDixon
Copy link
Author

{
"erd-preview.dotPath": "/Users/jourdandixon/graphviz-dot-macos-x64",
"erd-preview.erdPath": "erd-go",
"window.zoomLevel": 0
}

This works as far as viewing the preview, but I can't save as png, etc. After installing graphviz with homebrew, I tried changing the dotPath to graphviz and the other two versions, but none of those three would allow the preview or saving as...

@JourdanDixon
Copy link
Author

Hello again... just checking in to see how things are going with the above.

@bharat-p
Copy link

I am facing similar issue, unable to save Preview image as PNG or PDF, noticed following errors in console.


e.$onExtensionRuntimeError @ mainThreadExtensionService.ts:43
t._doInvokeHandler @ rpcProtocol.ts:461
t._invokeHandler @ rpcProtocol.ts:446
t._receiveRequest @ rpcProtocol.ts:366
t._receiveOneMessage @ rpcProtocol.ts:296
(anonymous) @ rpcProtocol.ts:171
e.fire @ event.ts:228
a @ ipc.net.ts:103
n._socketDataListener @ ipc.net.ts:132
emitOne @ events.js:116
emit @ events.js:211
addChunk @ _stream_readable.js:263
readableAddChunk @ _stream_readable.js:250
Readable.push @ _stream_readable.js:208
onread @ net.js:594
console.ts:134 [Extension Host] rejected promise not handled within 1 second
t.log @ console.ts:134
t._logExtensionHostMessage @ extensionHost.ts:453
(anonymous) @ extensionHost.ts:244
emitTwo @ events.js:126
emit @ events.js:214
emit @ internal/child_process.js:772
_combinedTickCallback @ internal/process/next_tick.js:141
_tickCallback @ internal/process/next_tick.js:180
mainThreadExtensionService.ts:42 [kaishuu0123.vscode-erd-preview]Cannot read property 'document' of undefined
e.$onExtensionRuntimeError @ mainThreadExtensionService.ts:42
t._doInvokeHandler @ rpcProtocol.ts:461
t._invokeHandler @ rpcProtocol.ts:446
t._receiveRequest @ rpcProtocol.ts:366
t._receiveOneMessage @ rpcProtocol.ts:296
(anonymous) @ rpcProtocol.ts:171
e.fire @ event.ts:228
a @ ipc.net.ts:103
n._socketDataListener @ ipc.net.ts:132
emitOne @ events.js:116
emit @ events.js:211
addChunk @ _stream_readable.js:263
readableAddChunk @ _stream_readable.js:250
Readable.push @ _stream_readable.js:208
onread @ net.js:594
mainThreadExtensionService.ts:43 TypeError: Cannot read property 'document' of undefined
	at context.subscriptions.push.vscode.commands.registerCommand.vscode.window.showSaveDialog.then.uri (/Users/bpatel/.vscode/extensions/kaishuu0123.vscode-erd-preview-3.1.0/out/extension.js:223:63)
	at <anonymous>

@kaishuu0123
Copy link
Owner

@JourdanDixon @bharat-p

I do not have enough time.
bugfix may take time.
Please wait a little more.

Sorry. (PR is always welcome.)

@kaishuu0123
Copy link
Owner

@JourdanDixon @bharat-p
vscode-erd released new version.
Please try again.

I want to feedback.

kaishuu0123 added a commit that referenced this issue Jan 17, 2019
* Setup manual
* Add Credits
kaishuu0123 added a commit that referenced this issue Jan 17, 2019
@JourdanDixon
Copy link
Author

It saves as an SVG fine. But if I try as PDF or PNG, it actually tries to save in the SVG format, but with the PDF / PNG extension. So the end result is telling me that the format is wrong. So, it looks like it works correctly until I attempt to open the file.

@kaishuu0123
Copy link
Owner

@JourdanDixon
Thank you for your feedback.

hm ... It does not reproduce on my Mac. I was in embarrassment.
please tell me graphviz-dot-macos-x64 version.

$ /home/(username)/graphviz-dot-macos-x64 --version

If you are not using v0.3.1, you may have encountered a bug in graphviz-dot-macos-x64.
Please download the latest version from here.

https://github.com/kaishuu0123/graphviz-dot.js/releases

@JourdanDixon
Copy link
Author

I updated everything to the current version. When I ran the "Save As...", it had this outcome:

  • SVG - Works perfectly
  • PDF - Only created an image of what would fit on a letter size paper at full size
  • PNG - Created a file but it couldn't be opened

@kaishuu0123
Copy link
Owner

@JourdanDixon
Sorry for the reaction is delayed.

Please attach PNG file to github.
(Perhaps the contents of the png file are text files.)

@notbloom
Copy link

I have the same problem on mac osx 10.15.4
The screen is just black.
I tried downloading erd-go and dot to a local folder, giving chmod -x permissions and referencing them in the extension settings.
Also installed with brew and the settings, same result.
using latest versions. they work on command line.
black screen doesn't show an error or nothing.

@JourdanDixon
Copy link
Author

With the newest version of all pieces, I get the same thing, just a black screen. It won't build the model anymore.

@kaishuu0123
Copy link
Owner

#35 (comment)

@notbloom
Copy link

notbloom commented Oct 7, 2020

it's working for me in version 5.0.0 ! <3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants