Closed uribo closed 5 years ago
Windows環境で使用しているので挙動のご報告。
init_textlintr()
を実行してもエラーにはなりませんが、インストールはされずにtextlint()
実行時に下記のようにエラーになります。こちらでも調べてみます。
textlintr::init_textlintr()
textlint(lint_target)
## Error in process_initialize(self, private, command, args, stdin, stdout, :
## Command not found
上記の挙動ですが、どうもglobalのnpmパッケージとしてtextlintを私がインストールしていたためらしく、一旦npm uninstall textlint -g
したところ、
textlintr::init_textlintr()
Yeah! Install was successful
とインストールでき、無事に
Error in process_initialize(self, private, command, args, stdin, stdout, :
processx error, create process: #193 %1 は有効な Win32 アプリケーションではありません。
at 'win/processx.c:1039'
が再現できました。確認していきます。
報告ありがとうございます。
はい、現在の仕様ではinit_textlintr()
の実行で .textlintr/
ディレクトリの中にpackage.json
を作成し、そこでnpm install
を行うようになっています(textlintおよびルール用のファイルがインストールされます)。
READMEの情報が誤っていますね。すみません、訂正しておきます (#12)。
globalの方にインストールしていても、is_installed_dependencies("textlint")
がTRUE
を返しているようなので、.textlintr/
に依存するコードがあるとそこでエラーになる…かも?今のところ問題ないですが。
本件、下記のエラーメッセージと同じなのですが、現象的にはちょっと違いそう…。実行pathには空白文字は入っていないので…。 https://support.microsoft.com/en-us/help/812486/event-id-7000-and-1-is-not-a-valid-win32-application-error-message-whe
こちらの、executableではない云々の方が気になりますね。 http://forums.codeguru.com/showthread.php?532247-error-193-with-CreateProcess-why
.js自体はwin上では単体では実行できない気がするので…もう少し調べてみます。
Sys.which("textlint")
の結果はどうなりますか?
こんな感じです。おや…?調べてみます。
> Sys.which("textlint")
textlint
""
ありがとうございます。一度textlintはアンインストールされているのですよね (https://github.com/uribo/textlintr/issues/5#issuecomment-428950894)
エラー処理が不十分で、init_textlintr()
で正常終了してもnpm install
が成功していない可能性があります。
こちらの問題はこのissueと違うと思うので、 続きは #15 で議論しましょう :)
Appveyor上のテストで
init_textlintr()
を実行すると次のエラーになる。https://ci.appveyor.com/project/uribo/textlintr/build/1.0.10#L441
権限周りのエラーのようで、今の所解決策がわからない。