Error Codes
Every failure the CLI raises itself carries an ERR_INCA_* code, printed with the message:
[inca] build failed (ERR_INCA_ENTRY_NOT_FOUND): no app entry found. check that …A failure with no code came from somewhere else (the bundler, the host, or Node itself), and its own message is what to search for.
ERR_INCA_ENTRY_NOT_FOUND
No entry point exists. The entry setting lists the files Incarnative.js looks for.
Create one of those files, or point entry in inca.config.ts at the file you use.
ERR_INCA_PACKAGE_JSON_INVALID
The app's package.json holds malformed JSON. The message names the file and the parse error. Fix the syntax and run the command again.
ERR_INCA_PACKAGE_JSON_NOT_FOUND
inca package requires the app's package.json, where it reads the name and version, and there is none in the directory it ran in. Run it from the app's own root, or add the file.
ERR_INCA_PRODUCT_NAME_MISSING
The packaged app has nothing to be called. The name comes from productName in inca.config.ts, and failing that from package.json's own top-level name. That is the npm package name with any scope stripped, so @acme/todo packages as todo. Neither is set.
Set productName when the app's display name isn't its package name.
ERR_INCA_PRODUCT_NAME_INVALID
The app's name becomes a directory name: <productName>.app on macOS. See productName for the naming rule this enforces.
inca package raises it too when the app's directory would share a name with a top-level file or folder of the build output, such as assets or chunks. Pick a different productName.
ERR_INCA_PUBLIC_FILE_RESERVED
inca package adds license files to the packaged app. It raises this error when public/ or the build writes a top-level file or directory with the name of one of them, such as public/NOTICE. Names compare without regard to case. Rename the file. The names are:
NOTICELICENSE-MITLICENSE-APACHE
ERR_INCA_ICON_NOT_FOUND
icon in inca.config.ts points at a .icns file that doesn't exist. The path is resolved from the app's root directory. inca dev retries when the file is created.
ERR_INCA_OUT_DIR_INVALID
outDir is, or contains, the app's root directory, its src/ or node_modules/, or its configured entry, including through a symlink. inca build and inca package delete every file under outDir that the build didn't write. Set it to a directory the build owns, such as "dist".
ERR_INCA_CONFIG_INVALID
The CLI or the host cannot use the value of one setting in the app's config. The message names the setting, its value and the kind of value it must be:
[inca] config failed (ERR_INCA_CONFIG_INVALID): window.width in inca.config.ts is "wide". it must be a numberWhen the value already has that kind, the message ends in "the host can't use it". Fix the value in inca.config.ts and run the command again.
For a config file the host cannot read, the message names the file and quotes the host's report.
ERR_INCA_PLATFORM_UNSUPPORTED
inca package runs on macOS and Linux. Windows isn't supported yet.
ERR_INCA_HOST_BIN_NOT_FOUND
A command that starts the host found no file at the host binary's path. inca dev stops before it builds anything.
Check the path INCA_HOST_BIN points at.
ERR_INCA_HOST_BIN_UNRESOLVED
No host binary could be found at all: the @incajs/host-* package for this platform isn't installed or carries no binary, and INCA_HOST_BIN isn't set. Every command that starts the host stops here too.
Install the app's dependencies, or set INCA_HOST_BIN to a binary you built yourself.
NOTE
Windows has no published package yet. See Host binary for platform support.
ERR_INCA_HOST_PACKAGE_CORRUPT
The @incajs/host-* package for this platform is installed and its binary is damaged. The message names the package and the reason.
Install the app's dependencies again.
ERR_INCA_HOST_UNPACK_FAILED
The CLI couldn't write the host binary to any directory it tried.
See The CLI can't unpack the host binary.
ERR_INCA_DEV_RUNNING
Another inca dev already has this app open, and its pid is in the message. Two of them watch the same files and write to the same terminal, so the second one refuses to start.
Quit the first, or stop the process by that pid if it was left behind.
ERR_INCA_HOST_EXITED_EARLY
The host exited before it reported ready, and inca dev exits with a non-zero code. Usually your app threw or rejected while the host loaded it, or the host speaks a protocol revision this @incajs/cli wasn't built for. It can also be a host that can't start at all, such as a missing Vulkan driver (see Troubleshooting). The line printed just before says which. Fix the error in your app, or install matching @incajs/cli and @incajs/host-* versions.
ERR_INCA_HOST_CRASHED
The host exited after it reported ready with a non-zero code, or was ended by a signal other than SIGINT or SIGTERM. inca dev exits with a non-zero code. The message gives the exit code or the signal.
The host's own output, printed before the exit, says what went wrong. Report it as a bug if your app didn't cause it.
ERR_INCA_PEER_NOT_FOUND
The app needs a package that incajs lists as a peer of its frontend, and it can't be resolved. The message names the package and asks to add it to the app's dependencies.
ERR_INCA_BUILD_NO_OUTPUT
The bundler finished without writing anything. This one is a bug in Incarnative.js. Please open an issue.
ERR_INCA_BUILD_NO_ENTRY_CHUNK
The bundler wrote files, but none of them was marked as the entry, so there is nothing for the host to evaluate. A bug in Incarnative.js too. Please open an issue.