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

SDK: Make @dotcms/client JavaScript library works in nodejs #29202

Closed
1 task
fmontes opened this issue Jul 11, 2024 · 3 comments
Closed
1 task

SDK: Make @dotcms/client JavaScript library works in nodejs #29202

fmontes opened this issue Jul 11, 2024 · 3 comments

Comments

@fmontes
Copy link
Member

fmontes commented Jul 11, 2024

Problem Statement

The @dotcms/client JavaScript library is currently not working with nodejs, causing issues for users who want to use it in their nodejs projects.

Steps to Reproduce

  1. Download this test-node app
  2. Go to the folder and npm install
  3. Run node index.js
  4. See the error.

Acceptance Criteria

Preview Give feedback

External Links

  • N/A

Assumptions & Initiation Needs

  • Probably they way we're building needs more work.
  • The JavaScript results is not minified or uglified (check the node_modules)
  • Maybe we need a bundler?

Quality Assurance Notes & Workarounds

N/A

@fmontes
Copy link
Member Author

fmontes commented Aug 21, 2024

Turns out this was a bigger problem, it was not only nodejs but:

  1. Nextra (dotcms.dev)
  2. Astro (@zJaaal is working on this one)

We needed to build the library @dotcms/client in commonjs and esmodule, we only had esmodules.

@KevinDavilaDotCMS
Copy link
Contributor

KevinDavilaDotCMS commented Aug 26, 2024

Passed IQA

Tested @dotcms/client at 0.0.1-alpha.32 version

Notes to QA

-You need to Download this folder

  • Run npm install
  • Then run node index
  • You should be able to see the information on the page you requested, without any errors.
  • You can run any client function without any console errors.
Screen.Recording.2024-08-26.at.5.43.19.PM.mov

@KevinDavilaDotCMS KevinDavilaDotCMS moved this from Internal QA to QA - Backlog in dotCMS - Product Planning Aug 26, 2024
@KevinDavilaDotCMS KevinDavilaDotCMS removed their assignment Aug 26, 2024
@github-project-automation github-project-automation bot moved this from QA - Backlog to Internal QA in dotCMS - Product Planning Aug 26, 2024
@KevinDavilaDotCMS KevinDavilaDotCMS moved this from Internal QA to QA - Backlog in dotCMS - Product Planning Aug 26, 2024
@bryanboza
Copy link
Member

Fixed, tested following the provided steps and now I'm unable to see the error.

Passed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

4 participants