zeplin / cli-connect-storybook-plugin

Zeplin CLI plugin to generate Storybook links for Zeplin components
MIT License
20 stars 3 forks source link

Receiving 404 on Storybook v6.1.0+ #39

Closed yuqu closed 3 years ago

yuqu commented 3 years ago

Projects using Storybook v6.1.0+ seems to be having problems when the plugin try to load Storybook into JSDOM.

Zeplin CLI - v1.1.6

Waiting Storybook to start…
Detected Storybook at http://localhost:6006/iframe.html

Connecting components to Zeplin components failed.

    404 - {"type":"Buffer","data":[60,33,68,79,67,84,89,80,69,32,104,116,109,108,62,10,60,104,116,109,108,32,108,97,110,103,61,34,101,110,34,62,10,60,104,101,97,100,62,10,60,109,101,116,97,32,99,104,97,114,115,101,116,61,34,117,116,102,45,56,34,62,10,60,116,105,116,108,101,62,69,114,114,111,114,60,47,116,105,116,108,101,62,10,60,47,104,101,97,100,62,10,60,98,111,100,121,62,10,60,112,114,101,62,67,97,110,110,111,116,32,71,69,84,32,47,105,102,114,97,109,101,46,104,116,109,108,60,47,112,114,101,62,10,60,47,98,111,100,121,62,10,60,47,104,116,109,108,62,10]}

Error is coming from JSDOM when it receive 404 from the started up instance. The buffer data is:

'<!DOCTYPE html>\n' +
  '<html lang="en">\n' +
  '<head>\n' +
  '<meta charset="utf-8">\n' +
  '<title>Error</title>\n' +
  '</head>\n' +
  '<body>\n' +
  '<pre>Cannot GET /iframe.html</pre>\n' +
  '</body>\n' +
  '</html>\n'

Workaround: Start the Storybook instance separately and then execute zeplin connect

yuqu commented 3 years ago

Fixed in #40