Skip to content

Commit a322ec7

Browse files
mikbergpcj
authored andcommitted
Add .json file extension to avoid files named package.js (#38)
1 parent 3a849c1 commit a322ec7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

node/internal/parse_yarn_lock.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ function printNodeModules(map) {
101101
}
102102

103103
function parsePackageJson(entry) {
104-
const pkg = require(`./node_modules/${entry.name}/package`);
104+
const pkg = require(`./node_modules/${entry.name}/package.json`);
105105
if (Array.isArray(pkg.bin)) {
106106
// should not happen: throw new Error('Hmm, I didn\'t realize pkg.bin could be an array.');
107107
} else if (typeof pkg.bin === 'string') {

0 commit comments

Comments
 (0)