npm95% confidence\u2191 40
SyntaxError: Cannot use import statement outside a module
Solution
Node is running the file as CommonJS but it contains ES module syntax. 1. Add `"type": "module"` to package.json (or rename the file to .mjs). 2. If using TypeScript: set `"module": "NodeNext"` and `"moduleResolution": "NodeNext"`. 3. For a script in a CJS project, use `.mjs` extension instead of changing package-wide config.
API access
Get this solution programmatically \u2014 free, no authentication.
curl https://depscope.dev/api/error/260bfec61a515a098971ca40d12cf77dcc775d70f0dd5581bf415057671f709ehash \u00b7 260bfec61a515a098971ca40d12cf77dcc775d70f0dd5581bf415057671f709e