Description
If the current directory's package.json contains a JSON syntax error, Vite+ outputs an unclear, unhelpful error message e.g. error: Failed to download Node.js runtime: expected value at line 1 column 1. It is not immediately clear that the issue is due to a syntax error in the package.json file.
Suggested solution
Improve the error messaging to explain the issue is due to an invalid package.json file.
Alternative
Perhaps more commands could be updated to allow execution regardless of package.json syntax issues, e.g. vp lint, vp format, etc, assuming the node_modules are at least already installed.
Additional context
The following reproduces the issue:
mkdir vp-test
cd vp-test
echo '.' > package.json
vp install
This will output:
VITE+ - The Unified Toolchain for the Web
error: Failed to download Node.js runtime: expected value at line 1 column 1
Everything performed using the latest Vite+ v0.3.1.
Validations
Description
If the current directory's
package.jsoncontains a JSON syntax error, Vite+ outputs an unclear, unhelpful error message e.g.error: Failed to download Node.js runtime: expected value at line 1 column 1. It is not immediately clear that the issue is due to a syntax error in thepackage.jsonfile.Suggested solution
Improve the error messaging to explain the issue is due to an invalid
package.jsonfile.Alternative
Perhaps more commands could be updated to allow execution regardless of
package.jsonsyntax issues, e.g.vp lint,vp format, etc, assuming thenode_modulesare at least already installed.Additional context
The following reproduces the issue:
This will output:
Everything performed using the latest Vite+ v0.3.1.
Validations