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

[Bug]: Possible breaking change for node v14.16.0 #4184

Closed
1 task done
wasd0109 opened this issue Feb 16, 2023 · 8 comments · Fixed by #4185 or #4189
Closed
1 task done

[Bug]: Possible breaking change for node v14.16.0 #4184

wasd0109 opened this issue Feb 16, 2023 · 8 comments · Fixed by #4185 or #4189

Comments

@wasd0109
Copy link

wasd0109 commented Feb 16, 2023

Kind of Issue

Crash / Error

Tool or Library

cspell

Version

from 6.22.0

Supporting Library

Not sure

OS

Macos

OS Version

v12.6.1

Description

Possible breaking change for node v14.16.0

Current project is running on node v14.16.0 and had lint-staged setup to perform spell check before git commit through npx cspell.

The error
Cannot find module 'node:worker_threads'
occur during npx cspell at the cspell/dist/util/cache/fileEntryCache.js file.

Reverting cspell version by installing a local version of cspell pre 6.22.0 with npm -g install cspell@6.21.0 remove the error

Steps to Reproduce

  1. Create new React project with Vite and TypeScript.
  2. Perform command npx cspell . without cspell installed locally
  3. The error should occur
  4. Install cspell v6.21.0 locally with npm -g install cspell@6.21.0
  5. npx cspell . again
  6. Cspell should run with no issue

Expected Behavior

No response

Additional Information

No response

cspell.json

{
  "version": "0.2",
  "language": "en",
  "words": ["reduxjs", "tanstack", "formio"]
}

cspell.config.yaml

No response

Example Repository

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@Jason3S
Copy link
Collaborator

Jason3S commented Feb 16, 2023

@wasd0109,

Thank you.

If you add --no-cache, it should work until there is a fix.

@wasd0109
Copy link
Author

Thank you for the quick response and fix! Will do so

@wasd0109
Copy link
Author

wasd0109 commented Feb 16, 2023

The new version solved the problem with the worker_threads module, but there seems to be other parts that were affected by similar problems, such as in @cspell/dynamic-import/dist/cjs/index.cjs.
I see that you guys will add node v14.x back into testing, I believe that it would help find all the remaining problems, but just to let you know.
Thank you for the quick response!

@Jason3S
Copy link
Collaborator

Jason3S commented Feb 16, 2023

@wasd0109

I doubled checked, it had passed all the tests on 14.x (latest).

@wasd0109
Copy link
Author

That's interesting, the problem seems to come from the @cspell/dynamic-import package, in the cjs/index.cjs where
var node_path = require('node:path');
var node_url = require('node:url');
cause the problem, I'm not sure if the package is in your jurisdiction?

@Jason3S Jason3S reopened this Feb 16, 2023
Jason3S added a commit that referenced this issue Feb 16, 2023
@Jason3S
Copy link
Collaborator

Jason3S commented Feb 16, 2023

@wasd0109,

Things run on 14.21 that will not run on 14.16.

It is not even possible to build the app on 14.16. RollupJS crashes.

@wasd0109
Copy link
Author

Thank you for the information, I will forward this to my team and perhaps consider upgrading the node version.

@github-actions
Copy link
Contributor

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
2 participants