Skip to content

package.json file path error #4

@liweta

Description

@liweta

const packageJSON = JSON.parse(fs.readFileSync(__dirname + "./../../package.json").toString());

Seems there's an error when concatenating package.json file path. Should be "/../../package.json" instead of "./../../package.json"?

2025-02-28 11:44:54.046 [error] Error: ENOENT: no such file or directory, open '/data/.vscode-server/extensions/ycodetech.automatic-comment-blocks-1.1.4/out/src./../../package.json'
	at Object.openSync (node:fs:573:18)
	at Object.readFileSync (node:fs:452:35)
	at Configuration.getExtensionNames (/.vscode-server/extensions/ycodetech.automatic-comment-blocks-1.1.4/out/src/configuration.js:162:43)
	at Configuration.getConfiguration (/data/.vscode-server/extensions/ycodetech.automatic-comment-blocks-1.1.4/out/src/configuration.js:177:55)
	at Configuration.getConfigurationValue (/data/.vscode-server/extensions/ycodetech.automatic-comment-blocks-1.1.4/out/src/configuration.js:193:21)
	at Configuration.setMultiLineCommentLanguageDefinitions (/data/.vscode-server/extensions/ycodetech.automatic-comment-blocks-1.1.4/out/src/configuration.js:397:48)
	at new Configuration (/data/.vscode-server/extensions/ycodetech.automatic-comment-blocks-1.1.4/out/src/configuration.js:46:14)
	at Object.<anonymous> (/data/.vscode-server/extensions/ycodetech.automatic-comment-blocks-1.1.4/out/src/extension.js:7:21)
	at Module._compile (node:internal/modules/cjs/loader:1469:14)
	at Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
	at Module.load (node:internal/modules/cjs/loader:1288:32)
	at Module._load (node:internal/modules/cjs/loader:1104:12)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions