native-unknown
What it means#
A native in a module of a program (the program extension) that names a package which is neither a module of Node (fs, node:path) nor in the dependencies or devDependencies of the project's package.json (the nearest above the model); or a file of the project (native "../ast.ts", relative to the module's generated file) that is not there, or that is not a .ts or .json file. Nothing is fetched: add the package to package.json (npm install), or name one it has.
How to fix it#
The message says what is wrong and where, and often what was meant (Did you mean …?). Change the model so that what this page describes no longer holds, then check again: archec check main.arche.
An error: archec builds nothing until it is fixed.
archec check --beginner says the most common messages in plain words, with the names that exist.
The automatic fix#
archec has no fix of its own for this code. When the message says Did you mean …?, VS Code offers that change (Quick Fix).
In the terminal#
archec explain native-unknown prints this explanation; archec explain program lists the codes of its area.