React-sketchapp: npm run render not draw in sketch

Created on 26 Apr 2017  ·  17Comments  ·  Source: airbnb/react-sketchapp

I am beginner and i have a problem :)

I do all by instruction and then run example projects it open sketch, but nothing to draw.

Can anyone help me?

Sketch 43.2
npm -v 3.10.10
node v6.9.5

Most helpful comment

I think I found something. Is it possible that a space character in one of the parent folder names of the project causes it to fail? Copied everything to a different path and now it works!

All 17 comments

I'm having the same issue

Sketch 43.2
npm 4.1.2
node 7.7.1

Seems like you just forgot this step Open a new Sketch file

OMG, its working :)
I did close all tabs in Sketch, and restart it, and it's working. Thanks!

Not for me. The new file is open and just in case I tried to restart Sketch, but still nothing. I've managed to link it as a plugin though, but not through npm run render

@raulalgo can you provide console output ?

Same here: Document gets focused, nothing happens. Plugin works fine!

bildschirmfoto 2017-04-26 um 12 06 31

[email protected] render /Users/ralvarezgo/Documents/personal/2017 04 26 react-sketch/react-sketchapp/examples/basic-setup
skpm build --watch --run

🖨 Copied src/manifest.json in 8ms
Executing post-build scripts
⛏ Built ./my-command.js in 1722ms
(null)

Same as @ChristophLabacher. The window gets focused but nothing happens.

I think I found something. Is it possible that a space character in one of the parent folder names of the project causes it to fail? Copied everything to a different path and now it works!

Exactly! Now it works!

Thanks everyone!

Is it possible that a space character in one of the parent folder names of the project causes it to fail?

Yes it did. I fixed it in [email protected] (just released)

Looks like everyone got it sorted, sorry for the hiccups. We should figure a way of opening Sketch to a blank document if it's not open yet.

@mathieudutour I still get the same behavior, with [email protected] installed and a new Sketch file open, when there is a space character in a parent folder name. Focus goes to the Sketch window, but nothing is drawn.

➔ npm run render

> colors@ render /Users/Mike/Dropbox/Documents/Work/2017/2017-04/20170427-Yavorsky-Try-React Experiments/react-sketchapp/examples/colors
> skpm build --watch --run

🖨  Copied src/manifest.json in 16ms
Executing post-build scripts
⚒  Built main.js in 4160ms
(null)

Mine is showing as follows, anyone knows why :O?

error screenshot

Hey! What folder are you running it from? The main directory or one of the
examples folders?

@jongold The react-skethapp folder is under my username directory. I try again, and the error becomes below: Still try to figure out :'(
screen shot 2017-05-24 at 10 06 34 am

@daouchovny this is a bug with Sketch 44 that we're working on fixing :( https://github.com/airbnb/react-sketchapp/issues/72

@jongold Awesome! Thank you so much! (Yes my Sketch version is 44.1.)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

0x77dev picture 0x77dev  ·  5Comments

LincMitch picture LincMitch  ·  7Comments

apexskier picture apexskier  ·  3Comments

thierryc picture thierryc  ·  5Comments

tafelito picture tafelito  ·  4Comments