Skip to content
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

Cannot find module 'C:\Users\username\AppData\Local\Temp\WebCompiler1.12.394\node_modules\less\bin\lessc' #471

Open
Darkicorn opened this issue Nov 11, 2020 · 2 comments

Comments

@Darkicorn
Copy link

Darkicorn commented Nov 11, 2020

Installed product versions

Visual Studio 2017
Visual Studio 2019
Web Compiler 1.12.394

Description

Every time I update Visual Studio 2017/2019, the Web Compiler extension stops working.

Steps to recreate

  1. Update Visual Studio.

Current behavior

After an update, trying to use "Web Compiler" -> "Recompile file" in Solution Explorer gives an error of:

Severity Code Description Project File Line Suppression State
Error module.js:471
throw err;
^

Error: Cannot find module 'C:\Users\Andrew\AppData\Local\Temp\WebCompiler1.12.394\node_modules\less\bin\lessc'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.runMain (module.js:604:10)
at run (bootstrap_node.js:390:7)
at startup (bootstrap_node.js:150:9)
at bootstrap_node.js:505:3 LHRPL E:\inetpub\wwwroot\LHRPL\LHRPL\css\LHRPL.less 0

Expected behavior

There should be no error: Web Compiler should still work.

Temporary remedy

  1. Uninstall the Web Compiler extension.
  2. Delete* the directory C:\Users\Andrew\AppData\Local\Temp\WebCompiler1.12.394
  3. Install the Web Compiler extension.

* Adjust the username as required.

Corroborating evidence

The issue is also reported on Stack Overflow:
https://stackoverflow.com/questions/62792048/less-in-web-compiler-for-visual-studio-2019-stopped-to-work

@Darkicorn Darkicorn changed the title Cannot find module 'C:\Users\Andrew\AppData\Local\Temp\WebCompiler1.12.394\node_modules\less\bin\lessc' Cannot find module 'C:\Users\username\AppData\Local\Temp\WebCompiler1.12.394\node_modules\less\bin\lessc' Nov 11, 2020
@Airn5475
Copy link

I keep getting this issue as well. Same steps work for me to correct it, but it doesn't last.

module.js:471
    throw err;
    ^

Error: Cannot find module 'C:\Users\ABauman\AppData\Local\Temp\WebCompiler1.12.394\node_modules\node-sass\bin\node-sass'
    at Function.Module._resolveFilename (module.js:469:15)
    at Function.Module._load (module.js:417:25)
    at Module.runMain (module.js:604:10)
    at run (bootstrap_node.js:390:7)
    at startup (bootstrap_node.js:150:9)
    at bootstrap_node.js:505:3 C:\Repos\....\Content\scss\style.scss		

@mbuonaccorsi
Copy link

Has this ever been resolved? I get this problem often. Removing the WebCompiler extension, clearing those folders out of the temp folder and re-installing fixes it but that is just a workaround.

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

No branches or pull requests

3 participants