tremonthedgehog Posted 21 hours ago Share Posted 21 hours ago I found this Github tool that should allow users to view craft, however when I download the zip file windows refuses to let me open it saying the zip file isn't valid. does anyone know what the root cause may be Quote Link to comment Share on other sites More sharing options...
HebaruSan Posted 12 hours ago Share Posted 12 hours ago The node_modules/.bin/nw file is a very weird symbolic link containing the code of an entire NodeJS script as its target: $ ls -gGtrh node_modules/.bin/ total 4.0K lrwxrwxrwx 1 1.7K 2025-03-11 8:16 AM nw -> '''#!/usr/bin/env node'$'\n\n''var fs = require('\''fs'\'');'$'\n''var path = require('\''path'\'');'$'\n''var spawn = require('\''child_process'\'').spawn;'$'\n''var bin = require('\''../lib/findpath.js'\'')();'$'\n\n''function run() {'$'\n'' // Rename nw.js'\''s own package.json as workaround for https://github.com/nwjs/nw.js/issues/1503'$'\n'' var packagejson = path.resolve(__dirname, '\''..'\'', '\''package.json'\'');'$'\n'' var packagejsonBackup = path.resolve(__dirname, '\''..'\'', '\''package_backup.json'\'');'$'\n'' if (!fs.existsSync(packagejsonBackup)) {'$'\n'' try {'$'\n'' fs.renameSync(packagejson, packagejsonBackup);'$'\n'' } catch (err) {}'$'\n'' }'$'\n\n'' // copy over any asset files (icons, etc) specified via CLI args:'$'\n'' require('\''../lib/app_assets'\'').copyAssets(process.platform, bin);'$'\n\n'' // Normalize cli args'$'\n'' var args = process.argv.slice(2);'$'\n'' var cwd = (args.length < 1) ? '\''.'\'' : args[0];'$'\n'' if (!fs.existsSync(path.resolve(cwd))) {'$'\n'' args = ['\''.'\''].concat(args);'$'\n'' } else {'$'\n'' args = [cwd].concat(args.slice(1));'$'\n'' }'$'\n\n'' // Spawn node-webkit'$'\n'' var nw = spawn(bin, args, { stdio: '\''inherit'\'' });'$'\n'' nw.on('\''close'\'', function() {'$'\n'' process.nextTick(function() {'$'\n'' process.exit(0);'$'\n'' });'$'\n'' });'$'\n\n'' // Restore package.json shortly after nw is spawned'$'\n'' setTimeout(function() {'$'\n'' try {'$'\n'' if (fs.existsSync(packagejsonBackup)) {'$'\n'' fs.renameSync(packagejsonBackup, packagejson);'$'\n'' }'$'\n'' } catch (err) {}'$'\n'' }, 1000);'$'\n''}'$'\n\n''if (!fs.existsSync(bin)) {'$'\n'' console.log('\''nw.js appears to have failed to download and extract. Attempting to download and extract again...'\'');'$'\n'' var child = spawn(process.execPath, [path.resolve(__dirname, '\''..'\'', '\''scripts'\'', '\''install.js'\'')], { stdio: '\''inherit'\'' });'$'\n'' child.on('\''close'\'', run);'$'\n''} else {'$'\n'' run();'$'\n''}'$'\n' Without knowing the text of the error you got, my guess would be that Windows doesn't support that. It looks like this repo was never properly packaged for easy use. It hasn't been touched in 10 years, which has several bad consequences: NodeJS code rots very rapidly, so the code probably doesn't work anymore The KSP vessel format has probably also changed a bit in 10 years, so even if you got it running it might not be able to actually read craft files The author is very unlikely to still be around to offer help it's probably not feasible to get this to work without a large investment of time and expertise. If you want to make that investment yourself, you can start by learning how to code in NodeJS: https://nodejs.org/en/learn/getting-started/introduction-to-nodejs Once you have a working NodeJS setup, try extracting all of the files except the node_modules folder, then regenerate it with whatever NodeJS programmers use nowadays instead of "npm install". Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.