Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v.0.12.0 breaks on pnm workspace #409

Closed
6 tasks done
davay42 opened this issue Dec 20, 2022 · 6 comments · Fixed by vitest-dev/vitest#2541
Closed
6 tasks done

v.0.12.0 breaks on pnm workspace #409

davay42 opened this issue Dec 20, 2022 · 6 comments · Fixed by vitest-dev/vitest#2541
Assignees
Labels
bug Something isn't working

Comments

@davay42
Copy link
Contributor

davay42 commented Dec 20, 2022

Describe the bug

In this pnpm workspace repo https://github.com/DeFUCC/gun-vue I got histoire running in a nested folder for a separate package. Histoire v.0.11.9 is going nice with this setup. But after update to v.0.12.0 I got errors about files not found: histoire doesn't see the images in the public folder inside the nested package, but goes to the top workspace root. JS also gets broken. May be some configuration may help cope with the change?

Error [ERR_MODULE_NOT_FOUND]: Cannot find package '@vite/env' imported from [workspace root]/node_modules/.pnpm/vite@4.0.2/node_modules/vite/dist/client/client.mjs

Reproduction

Fork https://github.com/DeFUCC/gun-vue and try updating histoire

System Info

System:
    OS: macOS 13.1
    CPU: (10) arm64 Apple M1 Pro
    Memory: 759.41 MB / 16.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 18.6.0 - /usr/local/bin/node
    npm: 9.2.0 - ~/Library/pnpm/npm
  Browsers:
    Brave Browser: 99.1.36.109
    Chrome: 108.0.5359.124
    Firefox: 108.0.1
    Safari: 16.2
  npmPackages:
    vite: ^4.0.2 => 4.0.2

Used Package Manager

pnpm

Validations

@davay42 davay42 added the to triage This issue needs to be triaged label Dec 20, 2022
@Akryum Akryum added bug Something isn't working and removed to triage This issue needs to be triaged labels Dec 20, 2022
@Akryum Akryum self-assigned this Dec 20, 2022
Akryum added a commit that referenced this issue Dec 20, 2022
@Akryum
Copy link
Member

Akryum commented Dec 20, 2022

I've released a temporary fix on 0.12.2

@davay42
Copy link
Contributor Author

davay42 commented Dec 21, 2022

Thank you @Akryum! Yes, this fixes the build! Yet the problem with images in the public folder is still to be solved. No rush, can move the images to workspace root till then.

Histoire config: theme.logo.square file /gun-vue-logo.svg does not exist (resolved to /gun-vue-logo.svg), check for typos in the paths
Histoire config: theme.logo.light file /components.svg does not exist (resolved to /components.svg), check for typos in the paths
Histoire config: theme.logo.dark file /components.svg does not exist (resolved to /components.svg), check for typos in the paths

@Akryum
Copy link
Member

Akryum commented Dec 21, 2022

This is a warning that you can ignore, I'll improve it to also check for the public folder

@alvarosabu
Copy link
Contributor

@davay42 were you able to build it and deploy it?

I'm having an error running build, I'm using unocss, dunno if it's related

vite v4.0.3 building for development...

watching for file changes...
file:///Users/x400048/Projects/github/portfolio/packages/ui/node_modules/histoire/dist/node/build.js:129
    const styleOutput = result.output.find(o => o.name === 'style.css' && o.type === 'asset');
                                      ^

TypeError: Cannot read properties of undefined (reading 'find')

Copy link
Member

Akryum commented Jan 2, 2023

@alvarosabu Do you have a reproduction?

@davay42
Copy link
Contributor Author

davay42 commented Jan 3, 2023

@alvarosabu yes, builds go fine now!

@Akryum Akryum closed this as completed Feb 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants