Skip to content

Lintr error on fresh install of VSCode and R #1600

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

Open
hongooi73 opened this issue Apr 10, 2025 · 2 comments
Open

Lintr error on fresh install of VSCode and R #1600

hongooi73 opened this issue Apr 10, 2025 · 2 comments
Labels

Comments

@hongooi73
Copy link

This is on a clean laptop at a new job. I've installed VSCode and R 4.4.3 (both as a user install) along with the REditorSupport extension. lintr fails with the following error:

Failed to run diagnostics: ! in callr subprocess.
Caused by error in `lintr::lint(path, cache = cache, text = content)`:
! Linter `linter()` failed in '':
Caused by error in `normalizePath()`:
! path[1]="": The system cannot find the path specified

All my packages were installed fresh from CRAN this week; in particular lintr is version 3.2.0. What could be causing this?

@hongooi73 hongooi73 added the bug label Apr 10, 2025
@hongooi73
Copy link
Author

More information: looking at the error message, lintr is running normalizePath on a temp filename. When I try to do the same, it fails when I set mustWork=TRUE:

> z <- tempfile()

> normalizePath(z)
[1] "C:\\Users\\HOOI\\AppData\\Local\\Temp\\RtmpiCCS5H\\file4b906ddf61d6"
Warning message:
In normalizePath(path.expand(path), winslash, mustWork) :
  path[1]="C:\Users\HOOI\AppData\Local\Temp\RtmpiCCS5H\file4b906ddf61d6": The system cannot find the file specified

> normalizePath(z, mustWork=FALSE)
[1] "C:\\Users\\HOOI\\AppData\\Local\\Temp\\RtmpiCCS5H\\file4b906ddf61d6"

> normalizePath(z, mustWork=TRUE) 
Error in normalizePath(path.expand(path), winslash, mustWork) : 
  path[1]="C:\Users\HOOI\AppData\Local\Temp\RtmpiCCS5H\file4b906ddf61d6": The system cannot find the file specified

@nev-awaken
Copy link

This might help: #967

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

No branches or pull requests

2 participants