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

Kotlin asset compiler errors with spaces in paths #2503

Closed
Zoweb opened this issue Jan 4, 2019 · 2 comments
Closed

Kotlin asset compiler errors with spaces in paths #2503

Zoweb opened this issue Jan 4, 2019 · 2 comments
Labels
🐛 Bug Stale Inactive issues

Comments

@Zoweb
Copy link
Contributor

Zoweb commented Jan 4, 2019

🐛 bug report

When building Kotlin code in a directory with spaces, Parcel errors out with [path to file before space] is not recognized as an internal or external command, operable program or batch file (on Windows). It is expected that this error will happen on other operating systems as well.

🎛 Configuration (.babelrc, package.json, cli command)

package.json:

{
  "name": "kotlin-parcel-test",
  "version": "1.0.0",
  "license": "MIT",
  "devDependencies": {
    "@jetbrains/kotlinc-js-api": "^1.2.12",
    "parcel": "^1.11.0"
  }
}

CLI command: npx parcel src/*.html

File structure:

package.json
src/
  \- index.html
  |- test.kt

🤔 Expected Behavior

Everything should compile as usual.

😯 Current Behavior

Parcel errors, saying that the directory before any spaces is not recognised as an internal or external command.

💁 Possible Solution

The bug is probably caused by there not being quotes around the path containing the Kotlin compiler, meaning that the OS interprets the space as separating the command and an argument.

🔦 Context

This issue came up while attempting to fix another bug, where I created a folder to test in that had a space in its name. When attempting to run Parcel, it came up with this error, so I had to remove any spaces from the path, and then it worked.

🌍 Your Environment

Software Version(s)
Parcel 1.11.0
Node 11.1.0
npm/Yarn 1.12.1
Operating System Windows 10 (1809)
@Zoweb
Copy link
Contributor Author

Zoweb commented Jan 4, 2019

This appears to be an issue in Node - kotlinc-js-api calls child_process.spawn, which doesn't seem to work when both arguments and the path have spaces (nodejs/node#7367).

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs.

@github-actions github-actions bot added the Stale Inactive issues label Jan 17, 2020
@github-actions github-actions bot closed this as completed Feb 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Stale Inactive issues
Projects
None yet
Development

No branches or pull requests

2 participants