-
-
Notifications
You must be signed in to change notification settings - Fork 573
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
Should @plone/types be a dependency on Volto? #5870
Comments
Hmm, this error does not occur locally only on the CI. I have the build job that runs |
I managed to simulate the error locally. I deleted the repository, made a new clone and ran the tests. Then the error occurred. When I ran the tests a second time, the errors no longer occurred. Then something happened on the first run that caused the error to stop occurring. Do I have to do anything before running the tests for the first time? @sneridagh , any tips? |
Add it as a devDependency |
Yes this works. Should we add it to the app generator's devDependencies? |
@wesleybl I am so over Jest... We have to move far from it as soon as we can :( I have a PR open to update all the deps/devDeps to the generator: I will add it there. I plan to add all the required dependencies there for 18 (apps/plone repo folder in the Volto repo), so we have them all already in projects/addons. Then we could go to pnpm also right away. |
@wesleybl I will work on it in the next days, please add |
@sneridagh I was having this problem with other packages too: Test suite failed to run
node_modules/@plone/volto/src/components/theme/SlotRenderer/SlotRenderer.tsx:1:29 - error TS7016: Could not find a declaration file for module 'react-router-dom'. '/builds/sgc/my.package-12677/my.package/node_modules/react-router-dom/index.js' implicitly has an 'any' type.
Try `npm i --save-dev @types/react-router-dom` if it exists or add a new declaration (.d.ts) file containing `declare module 'react-router-dom';`
1 import { useLocation } from 'react-router-dom' Test suite failed to run
node_modules/@plone/volto/src/helpers/Blocks/defaultBlocks.ts:1:28 - error TS7016: Could not find a declaration file for module 'uuid'. '/builds/sgc/my.package-12677/my.package/node_modules/uuid/dist/index.js' implicitly has an 'any' type.
Try `npm i --save-dev @types/uuid` if it exists or add a new declaration (.d.ts) file containing `declare module 'uuid';`
1 import { v4 as uuid } from 'uuid' I will add them too. |
Describe the bug
I updated an app for Volto 18.0.0-alpha.18 and started receiving the error below in my tests:
@plone/types
it is a development dependency on Volto. I wonder if it shouldn't be a real dependency. Or should I place it as a development dependency on my addon?To Reproduce
Steps to reproduce the behavior:
CI=true NODE_ICU_DATA=node_modules/full-icu yarn test --coverage --maxWorkers=2
Expected behavior
test run without error.
Software (please complete the following information):
The text was updated successfully, but these errors were encountered: