Skip to content

Commit

Permalink
fix: 371 error cannot find module node fetch (#372)
Browse files Browse the repository at this point in the history
* deps: add node-fetch

* deps: remove node-fetch types

Seems like node-fetch already includes types

* deps: downgrade node-fetch

Seems like node-fetch@3 requires esm.

https://stackoverflow.com/questions/69087292/requirenode-fetch-gives-err-require-esm

The solution is to use @2.
  • Loading branch information
ComradeVanti committed Jul 9, 2024
1 parent a562027 commit 430a434
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 16 deletions.
34 changes: 19 additions & 15 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
"@types/jest": "^29.5.12",
"@types/libnpmsearch": "^2.0.4",
"@types/node": "^18.19.31",
"@types/node-fetch": "^2.6.9",
"@types/npmlog": "^4.1.4",
"@types/pkginfo": "^0.4.1",
"@types/promptly": "^3.0.3",
Expand Down Expand Up @@ -73,6 +72,7 @@
"is-wsl": "^2.2.0",
"libnpmsearch": "^5.0.3",
"mkdirp": "^3.0.1",
"node-fetch": "^2.7.0",
"npm-registry-fetch": "^13.1.1",
"npmlog": "^6.0.2",
"pkginfo": "^0.4.1",
Expand Down

0 comments on commit 430a434

Please sign in to comment.