airbnb / react-sketchapp

render React components to Sketch ⚛️💎
http://airbnb.io/react-sketchapp/
MIT License
14.94k stars 820 forks source link

TypeError: null is not an object (evaluating 'context.document.currentPage') #46

Closed netsi1964 closed 7 years ago

netsi1964 commented 7 years ago

👋 Hello! Thanks for contributing. Please use the template that matches your intention

I am running npm run render inside one of the examples folder. Every time I get an error in terminal. image

Expected behavior: I expected the command to run successfully creating a new plug-in.

Observed behavior: I get this info:

npm run render

> profile-cards@ render /Users/sten/Documents/DEV/NODE/react-sketchapp/examples/profile-cards
> skpm build --watch --run

🖨  Copied src/manifest.json in 7ms
Executing post-build scripts
🔨  Built ./main.js in 34314ms
TypeError: null is not an object (evaluating 'context.document.currentPage')
line: 6740
column: 104

How to reproduce:

  1. Enter one of the example folder
  2. Run install and: npm run render

Sketch version: 43.2 (39069)

brijeshb42 commented 7 years ago

@netsi1964 You should already have an empty Sketch project open before running npm run render.

netsi1964 commented 7 years ago

Please state that in the instructions when someone wants to test it. And yes - that helped! Here is screenshot where I have altered the Profile Cards example. Great! image

jemgold commented 7 years ago

@netsi1964 sorry you ran into that - I need to make the docs clearer :(