Skip to content

TSC command returns no errors on Windows #47

@JanPeter

Description

@JanPeter

If I execute the :TSC command in neovim, it told me that no errors were found. While on my other Windows machine it did work properly. After trial and error I noticed that the on_stderr function was not implemented when the jobstart was called. I'm by no means a lua expert but did manage to show the error with adding the following to the opts table, I also had to comment the notify call - otherwise I couldn't see my message.

    err_buffered = true,
    on_stderr = function(_, data)
      vim.notify(vim.inspect(data))
    end,

I think someone who understands lua and neovim better should implement the error output in a proper way.
My problem was that neovim wasn't able to execute the tsc command from my node_modules/.bin folder. It did work when I executed the same command directly from PowerShell. I'm not sure why but it seemed that neovim calls the old PowerShell while I'm only using the new PowerShell Core and I checked my ExecutionPolicy on PowerShell core which was set to RemoteSigned as people suggested in https://stackoverflow.com/questions/58796490/tsc-ps1-cannot-be-loaded-because-running-scripts-is-disabled-on-this-system
After I checked the old PowerShell it said that the ExecutionPolicy is set to restricted, which seemed to be the problem in my case. After I set it to RemoteSigned it does work now within tsc.nvim.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions