The requested module 'node:util' does not provide an export named 'parseArgs'

86 views Asked by At

When I write the command line "json-server -w" to check the version of json but the error appears. How can I fix that error? The version of nodejs is 16.16.0. Please help me find the problem and solution. Thanks a lot

1

There are 1 answers

0
bogdanoff On

From Nodejs API Docs, util.parseArgs([config]) was implemented in Nodejs version v18.3.0, v16.17.0 or above.

Since yours is 16.16.0 its not available, so update it to new version.

Note: It also mentions

v20.0.0: The API is no longer experimental

So I encourage you to install nodejs version v20 or above