From 2713ee9d2301335d93b70d9e419137e0da4100da Mon Sep 17 00:00:00 2001 From: puneet Date: Mon, 12 Dec 2022 15:44:06 +0530 Subject: [PATCH] character encoding --- lib/instrumentation/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/instrumentation/index.js b/lib/instrumentation/index.js index 18e2d92a6ea..b7eb3577984 100644 --- a/lib/instrumentation/index.js +++ b/lib/instrumentation/index.js @@ -291,7 +291,7 @@ Instrumentation.prototype._startHook = function () { if (!isHandlingLambda && basedir) { pkg = path.join(basedir, 'package.json') try { - version = JSON.parse(fs.readFileSync(pkg)).version + version = JSON.parse(fs.readFileSync(pkg, 'utf8')).version } catch (e) { self._agent.logger.debug('could not shim %s module: %s', name, e.message) return exports