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

Support for Linux #465

Open
nrydevopswatch opened this issue Dec 30, 2019 · 16 comments
Open

Support for Linux #465

nrydevopswatch opened this issue Dec 30, 2019 · 16 comments

Comments

@nrydevopswatch
Copy link

Background:
I am a React full stack dev currently working with Grommet UI and would really like to use React Sketchapp for UI/UX. However, I do not have access to an OS X system. Most users are on Windows, OS X and Linux (in that order) but Linux and OS X are less than 10% of all computer users. Windows is closer to 90% but as developers most of us use Linux. Personally I work in Linux for almost everything including desktop and server. I would expect any Node.js based app to be able to run seamlessly across Windows, OS X and Linux the same.

| -------------------------------------------------------------------------------------------------

Requesting a new feature

Proposal/Feature-request:
I would like to request a feature to have the ability to run React Sketch.app on Linux. I feel that most developers will then have access to either OS X and or at least Linux like myself. If not possible with Node directly, I would like to propose an Electron based version.

| -------------------------------------------------------------------------------------------------

Reporting a bug or issue (not really a bug, but more of a feature request)

Expected behavior:
Is to run on Linux following npm install and then npm run render

Observed behavior:

git clone https://github.com/airbnb/react-sketchapp.git
cd react-sketchapp/examples/basic-setup && npm install

Works with no issues as expected

nrydevops@cloudshell:~/react-sketchapp (nrydevops)$ npm run render
npm ERR! missing script: render

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/nrydevops/.npm/_logs/2019-12-30T21_17_51_020Z-debug.log

additional logging:

0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'render' ]
2 info using [email protected]
3 info using [email protected]
4 verbose stack Error: missing script: render
4 verbose stack     at run (/usr/lib/node_modules/npm/lib/run-script.js:155:19)
4 verbose stack     at /usr/lib/node_modules/npm/lib/run-script.js:63:5
4 verbose stack     at /usr/lib/node_modules/npm/node_modules/read-package-json/read-json.js:116:5
4 verbose stack     at /usr/lib/node_modules/npm/node_modules/read-package-json/read-json.js:436:5
4 verbose stack     at checkBinReferences_ (/usr/lib/node_modules/npm/node_modules/read-package-json/read-json.js:391:45)
4 verbose stack     at final (/usr/lib/node_modules/npm/node_modules/read-package-json/read-json.js:434:3)
4 verbose stack     at then (/usr/lib/node_modules/npm/node_modules/read-package-json/read-json.js:161:5)
4 verbose stack     at /usr/lib/node_modules/npm/node_modules/read-package-json/read-json.js:382:12
4 verbose stack     at /usr/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:115:16
4 verbose stack     at FSReqCallback.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:61:3)
5 verbose cwd /home/nrydevops/react-sketchapp
6 verbose Linux 4.19.72+
7 verbose argv "/usr/bin/node" "/usr/bin/npm" "run" "render"
8 verbose node v12.14.0
9 verbose npm  v6.13.4
10 error missing script: render
11 verbose exit [ 1, true ]

Sketch version:
latest as of December 30, 2019

@mathieudutour
Copy link
Collaborator

I would expect any Node.js based app to be able to run seamlessly across Windows, OS X and Linux the same

I'd say it depends what the app is doing, isn't it?

The issue with running react-sketchapp on Linux is those 2 methods: https://github.com/Lona/node-sketch-bridge

If you can create a platform agnostic version of them, I'd be happy to merge it.

@mathieudutour mathieudutour changed the title Feature Request: Support for Linux | Node.js = Cross Platform | Electron? Support for Linux Dec 30, 2019
@nrydevopswatch
Copy link
Author

@mathieudutour Thanks for the reply. What is the Sketch app doing on OS X that is specific to Apple OS?

Is Sketch app using Apple Metal? Is that why it is not cross platform agnostic?

@mathieudutour
Copy link
Collaborator

Sketch is an macOS only app. This project is not associated with the company Sketch.
If you’d like to ask for a feature request to support other platforms, feel free to contact them specifically.

For this particular project, follow the link above to see what are the macOS specific API we need

@nrydevopswatch
Copy link
Author

I created this issue to ask for Linux support for React Sketchapp. I work on Linux most of the time and do not currently have access to a Mac computer. I'm not sure if I have capacity to create this capability.

@mathieudutour
Copy link
Collaborator

Right. I don’t have the bandwidth to work on that now, and it’s pretty low priority for me so I added the “help wanted” label. I’d be happy to merge a PR.

@nrydevopswatch
Copy link
Author

@mathieudutour Thanks! I'm going to work on getting a macOS computer setup so I can work with React Sketchapp and become more familiar with it. I figure this way I can better understand the functionality and maybe help with this technical enhancement request.

@macintoshhelper
Copy link
Contributor

macintoshhelper commented Mar 4, 2020

Hi, I think needing a Mac will be required for the foreseeable future to integrate React with design tooling, I would recommend getting a Mac Mini, or to use a VM (which as you mention, should be on Mac hardware or server for it to be licensed). (A lot of musicians/filmmakers are locked to the Mac ecosystem also :/ ). Migrating programs away from Objective C would be a lot of work – not really anything to do with the Metal API; there's more chance of having a Sketch app built for iPad OS, with the iPad/Mac ecosystem merge, I'd say, especially as macOS migrates away from x86.

I've looked into integrating React with Adobe XD (for cross-platform purposes). The XD API is too restrictive and closed for now, and can't be easily run in the cloud (or on Linux) due to the closed file format.

I believe https://github.com/amzn/sketch-constructor is cross platform, would need to integrate it together with react-sketchapp and a web viewer though.

What you could do, is use GitHub Actions (or another CI with a macOS VM) to automatically generate a Sketch library with react-sketchapp, and use something like Storybooks for design/dev.

@nrydevopswatch

This comment has been minimized.

@mathieudutour

This comment has been minimized.

@nrydevopswatch

This comment has been minimized.

@mathieudutour

This comment has been minimized.

@nrydevopswatch

This comment has been minimized.

@mathieudutour

This comment has been minimized.

@nrydevopswatch
Copy link
Author

Okay...back to the discussion at hand! I have done a lot with cloud since the early days of "cloud." As the founder of www.revuprender.com
My only other question at this point; Why not make this tool cloud based? What is stopping you as the main dev @mathieudutour from making it into something like VS Code Server?

@mathieudutour
Copy link
Collaborator

see my first answer

@nrydevopswatch

This comment has been minimized.

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

No branches or pull requests

3 participants