mirror of
https://github.com/nodejs/node.git
synced 2026-11-30 11:55:44 -05:00
doc: fix typo in ESM example
Refs: https://github.com/nodejs/node/pull/37468 PR-URL: https://github.com/nodejs/node/pull/40275 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Derek Lewis <DerekNonGeneric@inf.is> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Zijian Liu <lxxyxzj@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
1 parent
f848553fb8
commit
3b3aaa0a37
1 file changed
+1
-1
+1
-1
@@ -974,7 +974,7 @@ async function getPackageType(url) {
|
||||
// Compose a file path to a package.json in the same directory,
|
||||
// which may or may not exist
|
||||
const packagePath = resolvePath(dir, 'package.json');
|
||||
// Try to read the possibly non-existant package.json
|
||||
// Try to read the possibly nonexistent package.json
|
||||
const type = await readFile(packagePath, { encoding: 'utf8' })
|
||||
.then((filestring) => JSON.parse(filestring).type)
|
||||
.catch((err) => {
|
||||
|
||||
Reference in new issue
Block a user