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

fix(crowdinclient): esm require #238

Merged
merged 1 commit into from
Jan 11, 2025
Merged

fix(crowdinclient): esm require #238

merged 1 commit into from
Jan 11, 2025

Conversation

thompsonsj
Copy link
Owner

Crowdin API client package moved from import to require in #235 because it was causing issues as an import.

Change this to an ESM require in order to resolve a broken payload generate:importmap command.

nx run dev:"generate:importmap"


> @payload-crowdin-sync/[email protected] generate:importmap
> cross-env NODE_OPTIONS=--no-deprecation payload generate:importmap

/<project-path>/payload-crowdin-sync/plugin/src/lib/api/payload-crowdin-sync/translations.ts:39
const crowdin = require('@crowdin/crowdin-api-client');
                ^


ReferenceError: require is not defined in ES module scope, you can use import instead
    at <anonymous> (/<project-path>/payload-crowdin-sync/plugin/src/lib/api/payload-crowdin-sync/translations.ts:39:17)

Node.js v23.5.0

Copy link

nx-cloud bot commented Jan 11, 2025

View your CI Pipeline Execution ↗ for commit abf2fdc.

Command Status Duration Result
nx run-many --all --target=test --runInBand ✅ Succeeded 49s View ↗

☁️ Nx Cloud last updated this comment at 2025-01-11 14:54:06 UTC

@thompsonsj thompsonsj merged commit 13fbf5b into main Jan 11, 2025
2 checks passed
@thompsonsj thompsonsj mentioned this pull request Jan 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant