Closed mpdunlop closed 1 year ago
So it does appear that this tool currently requires git-bash to be installed for the mv
command. To support your environment, I could write a short node script to do this step in a more friendly way. I'll try to add this when releasing your other change.
The manual rename you did should have worked, though we do end up skipping a few packaging steps.
I'm not sure why it's failing to find create-nes-game
for the integration test step - I do recommend using the npm run
script rather than running node directly - that will ensure you have the right working directory, and some other minor things. If that works, feel free to ignore the rest of this comment!
Could I ask you to try two things? From the base directory of create-nes-game
could you run dir dist
to print the directory listing of binaries created.
Then also, try this command, which will directly test if using forward slashes on windows is our problem. (It tries to run the generated create-nes-game with the --version
flag)
node -e "require('child_process').spawn('./docs/../dist/create-nes-game', ['--version']).stdout.on('data', t => console.info(t.toString()))"
Here's what those look like on my windows machine, running from cmd (I have a few extra files)
So it does appear that this tool currently requires git-bash to be installed for the mv command. To support your environment, I could write a short node script to do this step in a more friendly way. I'll try to add this when releasing your other change.
I don't mind installing git-bash if it's useful to the project. Perhaps listing git-bash a pre-requisite for maintainers in the readme.md is enough?
I'll run the other commands and provide an update later today.
I'm have to admit that after running this again tonight I'm not able to reproduce the issue, whether running via node
or via npm
. I have a feeling I did not rename the executable correctly, which I can't verify now because I reset my repository to work on #3...
And I don't know what I was doing that made me think that running the spawn command with shell execution was necessary.
Thank you for your help and apologies for wasting your time with this!
No worries, like I said I appreciate the interest! I'm still planning to make the change to swap mv
to something cross-platform and release this when I can. Thanks for your attentiveness!
I'm unable to build the project or run the integration tests due to errors relating to Unix commands not being present. I assumed this was a problem as I'm running on a Windows machine with nothing installed to provide access to these (no cygwin, no windows subsystem for linux etc) but @cppchriscpp can build this on various Windows machines successfully. I'm opening this ticket in the hope of narrowing down why I'm running into these issues.
I'm using Node version v18.16.0, building using Command Prompt, using Git commit 322c7ae996a8585499bbc3fbe69a69003f76ddb1.
First I run restore node packages:
And then I attempt to build the project with
npm run build-all
.The first issue I run into is that the command
mv
is not found in my environment. I believe this is correct as I'm running on a windows machine, building using Node via a windows command prompt.At this stage, to continue and run the integration tests I manually rename
create-nes-game-win.exe
tocreate-nes-game.exe
.I then run
node ./test/integration/generate-roms
and get the following error (full error attached, relevant snippet below):The relevant line that is blowing up is in spawn-and-wait.js, namely:
const proc = childProcess.spawn(cmd, args, {cwd: options.cwd ? options.cwd : appConfiguration.workingDirectory});
The error appears to indicate that its running the
spawn
command (syscall: 'spawn ../../../dist/create-nes-game'
) but it can't be found, much like themv
command prior.I'm not sure how to start diagnosing the differences in our build environments, do you have any suggestions?
build-log.txt