Closed Blason closed 4 months ago
Since I am not pro in npm; I tried installing using the method given however getting below error
oot@mta-sts-testing-reporting:/opt/tls-rpt-monitor# npm install
up to date, audited 62 packages in 804ms
8 packages are looking for funding run npm fund for details
npm fund
found 0 vulnerabilities root@mta-sts-testing-reporting:/opt/tls-rpt-monitor# npm start
tls-rpt-monitor@1.1.0 start node index.mjs
file:///opt/tls-rpt-monitor/config.mjs:6 const contents = await readFile(filePath, {encoding: 'utf8'}); ^^^^^
SyntaxError: Unexpected reserved word at Loader.moduleStrategy (internal/modules/esm/translators.js:133:18) root@mta-sts-testing-reporting:/opt/tls-rpt-monitor# npm fund tls-rpt-monitor@1.1.0 ├── https://github.com/sponsors/ljharb │ └── qs@6.11.0, side-channel@1.0.4, call-bind@1.0.2, get-intrinsic@1.2.1, has-proto@1.0.1, has-symbols@1.0.3, object-inspect@1.12.3 └── https://github.com/sponsors/feross └── safe-buffer@5.2.1
Hi Blason,
What version of Node are you using? Versions of node which do not support the const keyword are now unsupported by the Node.js foundation, so should not be used (see also: #5 )
const
Since I am not pro in npm; I tried installing using the method given however getting below error
oot@mta-sts-testing-reporting:/opt/tls-rpt-monitor# npm install
up to date, audited 62 packages in 804ms
8 packages are looking for funding run
npm fund
for detailsfound 0 vulnerabilities root@mta-sts-testing-reporting:/opt/tls-rpt-monitor# npm start
file:///opt/tls-rpt-monitor/config.mjs:6 const contents = await readFile(filePath, {encoding: 'utf8'}); ^^^^^
SyntaxError: Unexpected reserved word at Loader.moduleStrategy (internal/modules/esm/translators.js:133:18) root@mta-sts-testing-reporting:/opt/tls-rpt-monitor# npm fund tls-rpt-monitor@1.1.0 ├── https://github.com/sponsors/ljharb │ └── qs@6.11.0, side-channel@1.0.4, call-bind@1.0.2, get-intrinsic@1.2.1, has-proto@1.0.1, has-symbols@1.0.3, object-inspect@1.12.3 └── https://github.com/sponsors/feross └── safe-buffer@5.2.1