@corsair-dev/cli 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +21 -1
- package/package.json +1 -1
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAsLA;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAQhE;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAsB,kBAAkB,CAAC,EACxC,GAAG,EACH,UAAU,EACV,kBAA0B,GAC1B,EAAE;IACF,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC7B,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAsLA;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAQhE;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAsB,kBAAkB,CAAC,EACxC,GAAG,EACH,UAAU,EACV,kBAA0B,GAC1B,EAAE;IACF,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC7B,eA8KA"}
|
package/dist/index.js
CHANGED
|
@@ -1060,10 +1060,30 @@ async function getCorsairInstance({
|
|
|
1060
1060
|
);
|
|
1061
1061
|
process.exit(1);
|
|
1062
1062
|
}
|
|
1063
|
+
const msg = typeof e === "object" && e && "message" in e && typeof e.message === "string" ? e.message : String(e);
|
|
1064
|
+
if (msg.includes("Could not locate the bindings file") || msg.includes("NODE_MODULE_VERSION") || msg.includes(".node")) {
|
|
1065
|
+
if (shouldThrowOnError) {
|
|
1066
|
+
throw new Error(
|
|
1067
|
+
`Native module error in ${possiblePath}: ${msg}
|
|
1068
|
+
|
|
1069
|
+
This is likely because a native Node.js addon (e.g. better-sqlite3) needs to be rebuilt for your current Node.js version. Try running:
|
|
1070
|
+
npm rebuild
|
|
1071
|
+
or reinstall your dependencies:
|
|
1072
|
+
rm -rf node_modules && npm install`
|
|
1073
|
+
);
|
|
1074
|
+
}
|
|
1075
|
+
console.error(`[#corsair]: Error loading ${possiblePath}: Native module binding not found.`);
|
|
1076
|
+
console.log("");
|
|
1077
|
+
console.log("[#corsair]: A native Node.js addon (e.g. better-sqlite3) needs to be rebuilt for your current Node.js version.");
|
|
1078
|
+
console.log("[#corsair]: Try running:");
|
|
1079
|
+
console.log(" npm rebuild");
|
|
1080
|
+
console.log("[#corsair]: Or reinstall your dependencies:");
|
|
1081
|
+
console.log(" rm -rf node_modules && npm install");
|
|
1082
|
+
process.exit(1);
|
|
1083
|
+
}
|
|
1063
1084
|
if (shouldThrowOnError) {
|
|
1064
1085
|
throw e;
|
|
1065
1086
|
}
|
|
1066
|
-
const msg = typeof e === "object" && e && "message" in e && typeof e.message === "string" ? e.message : String(e);
|
|
1067
1087
|
console.error(`[#corsair]: Error loading ${possiblePath}:`, msg);
|
|
1068
1088
|
process.exit(1);
|
|
1069
1089
|
}
|