79094533

Date: 2024-10-16 14:35:33
Score: 1
Natty:
Report link

Somewhere you are importing package.json and trying to use some of it's properties.

Per: Fully Stacked:

"For security reasons (a file extension alone is not a reliable enough indicator of the content type) you have to specify the type using with {type: "json"}."

so instead use (for example):

import pkg from "./package.json" with { type: "json" };

Note also the comment above and consider handling the case where the file (package.json in this example) is missing.

Reasons:
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: Mitch Rose