seflless / diagrams

Generate Flowcharts, Network Sequence Diagrams, GraphViz Dot Diagrams, and Railroad Diagrams
MIT License
764 stars 112 forks source link

Installation fails on Apple Silicon (M1) #45

Open nanodust opened 1 year ago

nanodust commented 1 year ago

Diagrams rules.

I love diagrams, long since replaced using dot native.

recently I upgraded to an M1 mac, and unfortunately diagrams doesn't seem to work on M1.

npm install -g diagrams

fails due to an electron dependency. Electron will only work with 11.0 or above on m1 - so I checked out this diagrams repository and replaced the dependency, and install npm install . but then it says it installs fine, yet does not / diagrams doesn't work.

I'm not a node developer and the chance of me figuring this out and contributing a solution is very low.

I write in case anyone else has successfully gotten diagrams to install on M1.

cs-akash-jarad commented 1 year ago

i am also facing similar issue

electron@3.1.13 postinstall /usr/local/lib/node_modules/diagrams/node_modules/electron node install.js

internal/modules/cjs/loader.js:905 throw err; ^

Error: Cannot find module '/usr/local/lib/node_modules/diagrams/node_modules/electron/install.js' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:902:15) at Function.Module._load (internal/modules/cjs/loader.js:746:27) at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:75:12) at internal/main/run_main_module.js:17:47 { code: 'MODULE_NOT_FOUND', requireStack: [] } npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/diagrams/node_modules/chokidar/node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! electron@3.1.13 postinstall: node install.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the electron@3.1.13 postinstall script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2023-03-30T11_14_18_578Z-debug.log