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
-
hello. thank you for the amazing project.
in general, i want to make few customizations to the
@payloadcms/ui
package (like optionally disabling drag functionality onTextField
when thehasMany:true
is 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/ui
instead 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.2
and^3.0.0
(for@payloadcms/eslint-config
and@payloadcms/eslint-plugins
since their latest version is3.0.0
) instead of usingworkspace:*
versions inpackage.json
files.i have successfully run
pnpm install
from the downloaded repo. and once i tried to build it, i also found that because of thetsconfig.json
references
containing paths to../payload
and../translations
i also needed to setgit sparse-checkout set packages/ui packages/payload packages/translations
. i did checkout again, again edited all thepackage.json
to not haveworkspace:*
, again successfully runpnpm install
from 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/ui
directory 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.json
pnpm
overrides
@payloadcms/ui
to 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 devsafe
and got the following error:if i change the path from
file:path-to-the-cloned-repo/payload/packages/ui
tofile:path-to-the-cloned-repo/payload/packages/ui/dist
(also i did try to add my custom builtpackages/payload
andpackages/translations
similar 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 devsafe
and navigate to a web page of my project, i get the following error:(the
./src/graphics/Account.tsx
is 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/ui
from 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/ui
package 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