Replies: 1 comment
-
|
to be more clear, for my project none of them worked out also i tried approaches of building with could anyone please show the process how to clone, build and install the built |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
hello. thank you for the amazing project.
in general, i want to make few customizations to the
@payloadcms/uipackage (like optionally disabling drag functionality onTextFieldwhen thehasMany:trueis set, so it will not a little glitch on mobile devices when we scroll over the text inputs). to achieve this, first i want to PoC the just building from the sources as they are.i have downloaded this repo with the following commands:
i am aiming to use my local copy of
@payloadcms/uiinstead of the one provided in the npm registry.the only things i have changed to make the build possible - i have stated the concrete versions like
^3.2.2and^3.0.0(for@payloadcms/eslint-configand@payloadcms/eslint-pluginssince their latest version is3.0.0) instead of usingworkspace:*versions inpackage.jsonfiles.i have successfully run
pnpm installfrom the downloaded repo. and once i tried to build it, i also found that because of thetsconfig.jsonreferencescontaining paths to../payloadand../translationsi also needed to setgit sparse-checkout set packages/ui packages/payload packages/translations. i did checkout again, again edited all thepackage.jsonto not haveworkspace:*, again successfully runpnpm installfrom the repo root.now i had 2 options of building:
a) building from the repo root with
pnpm run build:all(includingpnpm run build:ui)b) building from the
packages/uidirectory withpnpm run build.i tried independently both approaches, both of them run alright without errors. then i went to my own project, cleaned all the
node_modules, cache, and set in itspackage.jsonpnpmoverrides@payloadcms/uito befile:path-to-the-cloned-repo/payload/packages/ui. then (for both build approaches) i run in my projectrm -rf .next && rm -rf node_modules/.cache && pnpm run generate:importmap && pnpm run generate:types && pnpm run devsafeand got the following error:if i change the path from
file:path-to-the-cloned-repo/payload/packages/uitofile:path-to-the-cloned-repo/payload/packages/ui/dist(also i did try to add my custom builtpackages/payloadandpackages/translationssimilar way, but it had no effect to the next errors i am going to describe) this error is gone, but anyway, when i runpnpm run devsafeand navigate to a web page of my project, i get the following error:(the
./src/graphics/Account.tsxis my small custom component i insert toSanitizedConfig['admin']['components']['actions'][0]to show currently logged in account name. it worked without any problems with the@payloadcms/uifrom the npm registry)so what is the right approach to build this repo, but also i don't want to build the entire huge monorepo, i only want to build its
packages/uipackage the way it is building by the original devs who upload it to the npm registry https://www.npmjs.com/package/@payloadcms/ui ?i tried to search through contribution guide, issues, discussions, git actions, but unfortunately haven't found answers.
Beta Was this translation helpful? Give feedback.
All reactions