Skip to content

replace the deprecated cuid with @paralleldrive/cuid2#1088

Merged
sedwards2009 merged 1 commit into
nodegui:masterfrom
MomchilKalestrov:master
May 3, 2026
Merged

replace the deprecated cuid with @paralleldrive/cuid2#1088
sedwards2009 merged 1 commit into
nodegui:masterfrom
MomchilKalestrov:master

Conversation

@MomchilKalestrov
Copy link
Copy Markdown
Contributor

I had a problem with cuid not working properly:

/home/momchil/Projects/seraphimcms-installer/node_modules/@nodegui/nodegui/dist/lib/core/Style/StyleSheet.js:28
        cssId = (0, cuid_1.default)();
                                   ^

TypeError: (0 , cuid_1.default) is not a function
    at prepareInlineStyleSheet (/home/momchil/Projects/seraphimcms-installer/node_modules/@nodegui/nodegui/dist/lib/core/Style/StyleSheet.js:28:36)
    at QPushButton.setInlineStyle (/home/momchil/Projects/seraphimcms-installer/node_modules/@nodegui/nodegui/dist/lib/QtWidgets/QWidget.js:398:76)
    at QPushButton.memoized [as setInlineStyle] (/home/momchil/Projects/seraphimcms-installer/node_modules/memoize-one/dist/memoize-one.cjs.js:42:31)
    at new Window (file:///home/momchil/Projects/seraphimcms-installer/dist/window/index.js:1:1198)
    at file:///home/momchil/Projects/seraphimcms-installer/dist/main.js:1:39

I narrowed the problematic file to src/lib/core/Style/StyleSheet.ts, which used a nonexistent default export of cuid.

The only change I made was to replace cuid with a @paralleldrive/cuid2, since I found out cuid is deprecated.

Attempting to run the project again worked successfully.

One thing I'd like to note - maybe cuid/@paralleldrive/cuid2 should be replaced with something like crypto.random.UUID. I don't understand why a whole library is required to create random IDs.

@sedwards2009 sedwards2009 merged commit d54943c into nodegui:master May 3, 2026
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.

2 participants