Dependencies
Code imports a package that is not in package.jsondeps.undeclared-import
The code imports a package that no package.json lists. Either the name was made up (AI assistants invent plausible package names, and attackers register them), or it only works because another package happened to install it. A clean install, a different package manager or the next dependency update breaks the build in production.
- In force Rule deps.undeclared-import
- 3 clauses
At a glance
| Severity | medium |
|---|---|
| Certainty | Observed — the code as written is the problem |
| Looks at | your source code |
| When it runs | Runs on every scan |
How to fix it
If it is the package you meant, add it explicitly (`npm install <name>`) so the version is pinned in package.json and the lockfile. If you cannot find it on npmjs.com from its official docs, it was invented: replace the import with the real library.
Check your own app
Run npx scanlyfix scan in your project. Every finding gets an id; after fixing, npx scanlyfix verify <id> proves it is gone.
If it is a false positive in your project, silence that one line with // scanlyfix-ignore-next-line deps.undeclared-import -- <why>.
Your code stays
on your machine
Only findings are uploaded, and only to your own dashboard.
ScanlyFix
Security, privacy pages, SEO and AI visibility checked in one scan, with fixes your AI editor can apply.
Home