question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Yarn fixtures and yarn storybook

See original GitHub issue

yarn fixtures 执行有错误,

> yarn fixtures                                                                                                                                                     [20/249]
yarn run v1.16.0
$ node scripts/fixtures.js
 ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ | "mojidict/fixture1" | 0/100 | downloading
 ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ | "shanbay/fixture2" | 0/100 | downloading
Errors:
 mojidict/心/search.json
https://api.mojidict.com/parse/functions/search_v3

 ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ | "mojidict/fixture2" | 0/100 | downloading
 ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ | "mojidict/fixture3" | 0/100 | downloading
Done in 1.35s.

fixtures不完整 , 导致yarn storybook 报错

ERROR in ./test/specs/components/dictionaries/shanbay/requests.mock.ts
Module not found: Error: Can't resolve './response/love.json' in '/home/fangxing/repos/ext-saladict/test/specs/components/dictionaries/shanbay'
 @ ./test/specs/components/dictionaries/shanbay/requests.mock.ts 13:109-140
 @ ./test/specs/components/dictionaries sync ^\.\/.*\/requests\.mock\.ts$
 @ ./src/components/dictionaries/dictionaries.stories.tsx
 @ ./src sync \.stories\.tsx$
 @ ./.storybook/config.ts
 @ multi webextensions-emulator/dist/core ./node_modules/@storybook/core/dist/server/common/polyfills.js ./node_modules/@storybook/core/dist/server/preview/globals.js ./.st
orybook/config.ts (webpack)-hot-middleware/client.js?reload=true

ERROR in ./test/specs/components/dictionaries/mojidict/requests.mock.ts
Module not found: Error: Can't resolve './response/心/fetchTts.json' in '/home/fangxing/repos/ext-saladict/test/specs/components/dictionaries/mojidict'
 @ ./test/specs/components/dictionaries/mojidict/requests.mock.ts 12:203-240
 @ ./test/specs/components/dictionaries sync ^\.\/.*\/requests\.mock\.ts$
 @ ./src/components/dictionaries/dictionaries.stories.tsx
 @ ./src sync \.stories\.tsx$
 @ ./.storybook/config.ts
 @ multi webextensions-emulator/dist/core ./node_modules/@storybook/core/dist/server/common/polyfills.js ./node_modules/@storybook/core/dist/server/preview/globals.js ./.st
orybook/config.ts (webpack)-hot-middleware/client.js?reload=true

ERROR in ./test/specs/components/dictionaries/mojidict/requests.mock.ts
Module not found: Error: Can't resolve './response/心/fetchWord.json' in '/home/fangxing/repos/ext-saladict/test/specs/components/dictionaries/mojidict'
 @ ./test/specs/components/dictionaries/mojidict/requests.mock.ts 12:48-86
 @ ./test/specs/components/dictionaries sync ^\.\/.*\/requests\.mock\.ts$
 @ ./src/components/dictionaries/dictionaries.stories.tsx
 @ ./src sync \.stories\.tsx$
 @ ./.storybook/config.ts
 @ multi webextensions-emulator/dist/core ./node_modules/@storybook/core/dist/server/common/polyfills.js ./node_modules/@storybook/core/dist/server/preview/globals.js ./.s

不知道怎么处理, 我看fxitures api 也是正确的, 我暂时这样处理了,

请问执行yarn storybook的时候可以忽略错误吗,我没有找到这个option

image

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
crimxcommented, Apr 1, 2021

哦哦,好的,感谢反馈。看来要更新一下了

1reaction
unlsycncommented, Mar 31, 2021

如果上不了可以手动下载网页放到 test/specs/components/dictionaries/[对应词典]/response/ 中。

试了一下,还是有几个响应拿不到,也不方便手动执行

with proxy: http://172.24.96.1:1970
 ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ | "mojidict/fixture2" | 0/100 | downloading
 ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ | "shanbay/fixture2" | 0/100 | downloading
 ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ | "mojidict/fixture3" | 0/100 | downloading
Done in 0.66s.
Read more comments on GitHub >

github_iconTop Results From Across the Web

@storybook/react | Yarn - Package Manager
Important: This documentation covers modern versions of Yarn. For 1.x docs, see classic.yarnpkg.com. Yarn.
Read more >
Install Storybook
Storybook is a frontend workshop for building UI components and pages in isolation. Thousands of teams use it for UI development, testing, and...
Read more >
marionette/yarn.lock at next - GitHub
Storybook framework support for marionette. Contribute to storybookjs/marionette ... This file is generated by running "yarn install" inside your project.
Read more >
Lion Brand Cover Story Yarn | JOANN
Shop Lion Brand Cover Story Yarn and more blanket yarn from top brands like Red Heart Yarn, Bernat Yarn & more at JOANN....
Read more >
@storybook/addon-storyshots - npm
yarn add @storybook/addon-storyshots --dev ... (Or whatever the name you prefer, as long as it matches Jest's config testMatch ).
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found