airbnb/react-sketchapp

Building 'symbols' example after changes fails when browsing Symbols page in Sketch

maciej-gurban opened this issue · 1 comments

I am...

Reporting a bug or issue
Making code changes while on Symbols page breaks the build

Expected behavior:
Making changes to the code would reflect them in Sketch regardless of which page is being browsed, as is the case with all the other examples.

How to reproduce:

  1. Go to symbols example and run it using npm run render. This renders "Page 1" correctly
  2. Switch page from "Page 1" to "Symbols" in Sketch
  3. Make any code change to the component file(s) while on "Symbols" page and save the file
  4. Causes a build error, from which one cannot recover unless going back to "Page 1". The error:
Error: Cannot render into Symbols page
   at render (/Users/XXX/sketchapp/react-sketchapp/examples/symbols/symbols.sketchplugin/Contents/Sketch/my-command.js:4010:16)
   at /Users/XXX/sketchapp/react-sketchapp/examples/symbols/symbols.sketchplugin/Contents/Sketch/my-command.js:8600:30
   at __skpm_run (/Users/XXX/sketchapp/react-sketchapp/examples/symbols/symbols.sketchplugin/Contents/Sketch/my-command.js:50505:17)
   at __skpm_run[native code] (/)

Sketch version:
Version 58 (84663)

The error is pretty clear: you can't execute the plugin while on the Symbols page.