Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Node build fails with 'illegal characters in path' #955

Open
david-pfx opened this issue Mar 6, 2023 · 4 comments · May be fixed by #968
Open

Node build fails with 'illegal characters in path' #955

david-pfx opened this issue Mar 6, 2023 · 4 comments · May be fixed by #968

Comments

@david-pfx
Copy link

Here is the node install and command line:
npm i rimraf compress-images web-resource-inliner ncp gifsicle@5.3.0 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.

@sftrabbit
Copy link
Contributor

sftrabbit commented Mar 6, 2023

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.

@david-pfx
Copy link
Author

I agree 100%. Working on it (if I ever get the sodding thing to work😣)

@david-pfx
Copy link
Author

Problem solved. I'll submit a PR.

david-pfx added a commit to david-pfx/PuzzleScript that referenced this issue Mar 8, 2023
Illegal characters in file name or script are replaced by "!", and a warning emitted.
david-pfx added a commit to david-pfx/PuzzleScript that referenced this issue Apr 23, 2023
Illegal characters in file name or script are replaced by "!", and a warning emitted.
david-pfx added a commit to david-pfx/PuzzleScript that referenced this issue Apr 24, 2023
@david-pfx
Copy link
Author

Single purpose PR submitted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants