0

I try to get file in the VSCode extension project on Windows, but it return wrong path and error message:

Error: ENOENT: no such file or directory, lstat 'C:\F:\...'

enter image description here

I try to change path but it is not working.

// src\utils\index.ts
const isFile = async (input: string) => {
  // input = input.match(/:\//) ? input.replace(/:\//, '://') : input;
  input = input.match(/:\//) ? '/..' + input : input;
  const stat = await fs.lstat(input);
  return stat.isFile();
};

The project: vscode-imagemin

How can I fixed the problem?

Reginna
  • 219
  • 4
  • 15

0 Answers0