Skip to content

Lintr error on fresh install of VSCode and R #1600

Closed

Description

@hongooi73

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?

Activity

  1. hongooi73 commented on Apr 10, 2025

    @hongooi73
    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
    
  2. nev-awaken commented on Jun 3, 2025

    @nev-awaken

    This might help: #967

  3. codiegw commented on Jul 25, 2025

    @codiegw

    I am also having this same issue, with the same R version. Running on Windows 11. I don't have any .lintr file, and the error is flagging for all .R and .Rmd files in my folder. Interestingly, the linting still seems to happen, but I get this error as well as the lint comments. I am not creating a package so don't have any DESCRIPTION files or anything to that effect.

  4. ThomasSoeiro commented on Sep 23, 2026

    @ThomasSoeiro
    Collaborator

    @eitsupi @Fred-Wu @grantmcdermott Close as duplicate of #1630?

  5. eitsupi commented on Sep 23, 2026

    @eitsupi
    Member

    Closed by #1697

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions