add crc-32 package and rebuild package lock files
This commit is contained in:
@@ -65,6 +65,27 @@ try {
|
||||
}
|
||||
}
|
||||
|
||||
// Import crc-32 for file integrity checks (try multiple locations)
|
||||
let crc32;
|
||||
try {
|
||||
// Try local node_modules first
|
||||
crc32 = require('crc-32');
|
||||
} catch (err) {
|
||||
try {
|
||||
// Try to find npm global prefix and load from there
|
||||
const npmPrefix = execSync('npm config get prefix', { encoding: 'utf-8' }).trim();
|
||||
const globalCrc32 = join(npmPrefix, 'node_modules', 'crc-32');
|
||||
crc32 = require(globalCrc32);
|
||||
} catch (err2) {
|
||||
console.error(
|
||||
'\n❌ Missing dependency: crc-32\n' +
|
||||
'Please install globally with: npm install -g crc-32\n' +
|
||||
'Or locally in the current directory with: npm install crc-32\n'
|
||||
);
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
// CONFIGURATION
|
||||
// ============================================================================
|
||||
|
||||
Reference in New Issue
Block a user