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 report]: Cannot convert undefined or null to object. Node v12.20.0 ~ v14 #199

Closed
Zhengqbbb opened this issue Nov 5, 2024 Discussed in #198 · 4 comments
Closed
Labels
bug Something isn't working

Comments

@Zhengqbbb
Copy link
Owner

Zhengqbbb commented Nov 5, 2024

Discussed in #198

Node: v12.20.0

Originally posted by dayney November 5, 2024
These errors were displayed when I reinstalled:

npm WARN deprecated [email protected]: Glob versions prior to v9 are no longer supported
npm WARN deprecated [email protected]: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.

> [email protected] prepare /Users/krui/git/work/purchase-weapp
> husky install

husky - Git hooks installed
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN notsup Unsupported engine for [email protected]: wanted: {"node":">=v14.21.3"} (current: {"node":"14.17.3","npm":"6.14.13"})
npm WARN notsup Not compatible with your version of node/npm: [email protected]

after, I run the following command to give the prompt is

git add package*
git cz 
Cannot convert undefined or null to object

Cannot convert undefined or null to object

@Zhengqbbb Zhengqbbb pinned this issue Nov 5, 2024
@Zhengqbbb Zhengqbbb changed the title [BUG report]: The prompt given in node 14.17.3 throw error: Cannot convert undefined or null to object [BUG report]: Cannot convert undefined or null to object. Node v12.20.0 ~ v14 Nov 5, 2024
@Zhengqbbb
Copy link
Owner Author

Zhengqbbb commented Nov 5, 2024

@dayney First of all, thank you very much for pointing out this BUG.

  1. After investigation, this bug appeared when switching from node-fetch to node-fetch-cjs, primarily to address issues with node v22 error fix: suppress node 22 deprecated error messages #179.
  2. Testing has shown that node-fetch-cjs has different issues in node v12, node v14, and node v16.

In response to this issue, the following changes were made in #200:

  1. Changed node-fetch-cjs to dynamic import to ensure that cz-git and czg can run in node >= v12.20.
  2. Added minimum version requirements for node (>= v16.5) in cases where node-fetch is needed in AI mode.

I plan to release v1.11.0 this weekend.
I have released a next pre-release version 🌟(v1.11.0-beta.2)🌟 for testing.
Welcome to try it out! 👀 Let me know if there are still any issues. 🎉

npm i -D cz-git@next
Node v12.20.0 Node v14.17.3

@dayney
Copy link

dayney commented Nov 5, 2024 via email

@Zhengqbbb Zhengqbbb added the bug Something isn't working label Nov 5, 2024
@Zhengqbbb
Copy link
Owner Author

@dayney
The latest version 🌟(v1.11.0)🌟 released and should be resolve this issue request , please have a try. 💪
👀 Let me know if there are still any issues. 🎉

@dayney
Copy link

dayney commented Nov 8, 2024 via email

@Zhengqbbb Zhengqbbb unpinned this issue Nov 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants