PuzzleScript
PuzzleScript copied to clipboard
Node build fails with 'illegal characters in path'
Here is the node install and command line:
npm i rimraf compress-images web-resource-inliner ncp [email protected] concat ycssmin terser gzipper html-minifier-terser glob
node compile.js
Here is the full error trace:
Error: Illegal characters in path.
at pathArg (d:\MyDocs\dev\Polyomino\PSForks\(increpare)PuzzleScript\node_modules\rimraf\dist\cjs\src\path-arg.js:45:33)
at AsyncFunction.<anonymous> (d:\MyDocs\dev\Polyomino\PSForks\(increpare)PuzzleScript\node_modules\rimraf\dist\cjs\src\index.js:57:47)
at d:\MyDocs\dev\Polyomino\PSForks\(increpare)PuzzleScript\compile.js:53:12
at cb (d:\MyDocs\dev\Polyomino\PSForks\(increpare)PuzzleScript\node_modules\ncp\lib\ncp.js:255:37)
at WriteStream.<anonymous> (d:\MyDocs\dev\Polyomino\PSForks\(increpare)PuzzleScript\node_modules\ncp\lib\ncp.js:133:14)
at Object.onceWrapper (node:events:627:28)
at WriteStream.emit (node:events:525:35)
at finish (node:internal/streams/writable:748:10)
at node:internal/streams/writable:726:13
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
path: 'd:\\MyDocs\\dev\\Polyomino\\PSForks\\(increpare)PuzzleScript\\bin\\images\\*.png',
code: 'EINVAL'
}
Debugging shows that the illegal character is the '*'. My guess is it should be globbed, but isn't. Beyond that I have no idea.
This is caused by a breaking change in rimraf version 4. See: isaacs/rimraf#251. On Linux/MacOS, the glob path is a valid path so just doesn't delete any images.
Need to pin rimraf to version 3. We should commit package.json
and package-lock.json
to avoid these kinds of issues cropping up.
I agree 100%. Working on it (if I ever get the sodding thing to work😣)
Problem solved. I'll submit a PR.
Single purpose PR submitted.