Cannot find 'node_modules/typescript/lib/lib.d.ts' in tsconfig file - tsconfig

After I update a package , I saw this error( meanwhile I updated my vs code ) /
I dont know how to fix this error, appreciate it if anyone helps me out in this case to handle this error
File 'c:/Program Files/Microsoft VS Code/resources/app/extensions/node_modules/typescript/lib/lib.d.ts' not found.
The file is in the program because:
Default library for target 'es5'

This happened to me right after I've updated my VS Code today.
Restarting TypeScript server didn't help. So I've found the answer here.
To 'fix' it, I had to:
Install the JavaScript and TypeScript Nightly VS Code extension.
Open any TypeScript file.
Open command pallete (ctrl+p) and type:
>Typescript: Select TypeScript Version
Select the VS Code version.
I hope it helps.

I just got this error. It was not due to the VS Code installation. It was due to a partial "node_modules" deletion.
In your case, this new package or its dependencies did not install properly.
Exit VS Code, remove "node_modules" folder completely and run yarn again (or npm if it is your package manager).
It will be fixed.

Restarting the TS server in Visual Studio Code did the trick for me as described here:
CMD+SHIFT+P (or CTRL-SHIFT+P) ->

Related

Why can't I create a Q#create project on VisualStudio Code with QDK || ISSUE :command "'quantum.newProject' failed.)"

help regarding the issue below would be really appreciated :
Command 'Q#: Create new project...' resulted in an error (Running the contributed command: 'quantum.newProject' failed.)
I was trying to follow this exercice : https://learn.microsoft.com/fr-fr/learn/modules/qsharp-create-first-quantum-development-kit/2-install-quantum-development-kit-code
after downloading and running the latest versions of .NET CORE, VSCODE, I can run "Q# Install command line project templates" but can't run "Q# Create a new project : See screenshot1 screenshot 2 CODE SOURCE ERROR
I already done this exercice in May last year but for some reasons I get stuck at the very beginning of the process now.
Could it be a version issue ? I remember that the tutorial was different (May 2020) than the one above I shared to you. Unfortunately I can't find the previous tutorial as it has been updated since.
I tried to uninstall the latest versions to reinstall the versions I downloaded in May : useless, I get the same issue.
Many thanks for you help !
I decided to go with an older version v0.14.2011120240
It seems the new version isn't stable yet.
Install NodeJS: https://nodejs.org/dist/v14.15.4/node-v14.15.4-x64.msi
Then restart VS Code.
"The below steps currently has a dependency to install node.js including npm. We are working on removing that dependency. Alternatively, use our the command line templates to create a Q# project , or use Visual Studio."
https://learn.microsoft.com/de-de/azure/quantum/install-command-line-qdk?tabs=tabid-vscode

Why SQLite crash in UWP with cannot find the file specified?

I install the SQLite from Nuget as below:
And after I ran the program it throws this error:
I feel strange that it showed the Version is 1.0.109.0 but not the version I installed which 1.0.109.2
What's more, I tried the way what Could not load file or assembly 'System.Data.SQLite, Version=1.0.109.0 - Why does it search for version 1.0.109.0 when I have referenced 1.0.109.1
said
But all the way no works.
In addition, I opened the .csproj and here is the SQLite package reference:
The version in .csproj is right.
What's wrong with it.Would you please tell me how to solve it? Thank you.
Make sure that the SQLite assembly gets copied to your output directory so it can be found at runtime. It should if you install the SQLite package in your UWP app project.

Why did my solution fail to build overnight with the error "Failed to retrieve information from remote source"?

We have a solution file which contains several projects which builds just fine on my computer using both "dotnet" CLI as well as Visual Studio 2017. Literally overnight, the build would fail, and I cannot associate the change that may have attributed to the failure. Both VS2017 and CLI failed with a message like this:
C:\Program Files\dotnet\sdk\1.0.4\NuGet.targets(97,5): error : Failed to retrieve information about 'System.Xml.XmlDocument' from remote source 'D:\mtp\proj.vs\hello_proj\bin\Release\PublishOutput'. [D:\mtp\proj.vs\server-ray\my_solution.sln]
This is is misleading, as the hello_proj where this seems to indicate, is configured for building "Debug" as oppose to the "Release" shown. I have already attempted to clear out all cached packages, copied packages to where the solution resides, and copied the packages to where the error indicates, but I could not get over this error. Nuget is obviously getting some information somewhere to look for the packages in the wrong place, but I don't really know where it gets that info from. I also verified that the "missing" packages exist in the "global-packages" folder (found by running "nuget local all -list").
I found something that fixed my problem; I searched for Nuget.Config in the entire C: drive and found one in %appdata%\Nuget\Nuget.config. I removed it and the build went through successfully. The Nuget.config was restored to some default values that fixed the problem. I can't explain it; just glad it worked.
It looks like that one of your dependencies is pointing to D: which could have been removed by any reason. I suggest you to delete the packages folder, find the dependency that refers to D: and remove and add it again from NuGet. By the end you can let Visual Studio restore all of dependencies.

Why is Visual Studio looking for my gulpfile in the wrong folder?

Backstory
I've been trying to set up a project in Visual Studio, which uses GulpJS to compile Sass. I was told that VS should automatically recognize the package.json inside a project and run npm install, but I had to do that manually through a command line. Even then, when I opened Task Runner Explorer, it says that there are (No tasks found). My coworker and I looked up solutions that worked for other people, many of which reported having success after restarting VS, clearing some cached data, or reinstalling the node modules; however none of those worked for me. Here are some solutions I've attempted:
Visual Studio 2015 RC Gulp task runner not detecting tasks (All Answers)
https://stackoverflow.com/a/37437209/6425704
Basically the entire first page of Google for "visual studio gulp no tasks found"
The Problem
After some digging, I came across the Package Manager Console and decided that maybe I can run gulp through that instead of opening a separate CMD window. However, when I did, I got the following:
[11:27:43] Local gulp not found in C:\
[11:27:43] Try running: npm install gulp
My immediate thought was that I might need to reinstall the dependencies, so I ran npm install and got this output:
npm : npm WARN enoent ENOENT: no such file or directory, open 'C:\package.json'
At line:1 char:1
+ npm install
+ ~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (npm WARN enoent...:\package.json':String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
npm WARN !invalid#1 No description
npm WARN !invalid#1 No repository field.
npm WARN !invalid#1 No README data
npm
WARN
!invalid#1 No license field.
This is when I noticed that it is looking for C:\package.json instead of the one inside my Project directory. However, when I ran ls, it clearly shows that it's inside the Solution root, at C:\Dev\solution-name. I tried navigating to the specific Project, using cd Presentation\Nop.Web, but I still get the result of it looking in the C:\ root. Can anyone explain why this is happening and how I can fix it?
I finally figured it out (one more day, and I would've offered a bounty for this question), and it's not a problem with VS. Back when I first started using this specific computer and was still using Windows' default Command Prompt, I didn't like it starting in %USERPROFILE% by default. So I looked for a way change the default and stumbled upon a registry "hack" which essentially runs cd C:/ on cmd.exe startup. However, it turns out that this causes other command line tools, including Powershell and VS's Package Manager to run that command.
If anyone else is experiencing this issue (which, due to the nature of this situation, I doubt anyone has), you can try following these steps:
Open up Registry Editor. I did it by using the Windows Run tool (Win + R) and typing regedit.
Navigate to HKEY_CURRENT_USER > SOFTWARE > Microsoft > Command Processor.
Remove AutoRun (or change its value to something that won't interfere with your workflow).
More info here.
Original Registry Tutorial (Note that if I had scrolled down a bit more, I might have avoided this situation.)

WebEssentials less support not working

I'm using VS 2013 Update 4, with Web Essentials installed (the latest version)
If I create a brand new project, and add one .less file with nothing in it but a body declaration
body {
font-size: 10px;
}
I get this error "Compilation Error occurred (see error list to navigate to the error location):".
The error list is completely empty however.
I've done everything I've read, like uninstall / reinstall.
Hard to believe this is so hard and doesn't work out of the box?
Is there something else I can use that will convert to .css files within Visual Studio upon save?
Thanks, this is frustrating!!
I had the same issue with the 2.5.2 update.
I ended up uninstalling version 2.5.2. and installed the stable 2.5 version https://github.com/madskristensen/WebEssentials2013/releases/tag/v2.5 (.vsix)
After this everything was working again.
So:
Uninstall 2.5.2
Restart VS 2013
Install 2.5 (.visx)
tada
For me the problem was a hash(#) in the folder structur where my project was in.
So C:\Develop\C#\MyProject\... failed while C:\Develop\CSharp\MyProject\... worked.
I tracked down a way to fix this with the current version of WE (the issue is due to either NodeJS not being packed right or extracted right - not sure which). So to fix this simply reinstall node and set the modules back up
Locate the path where WE is installed
Should be something like C:\Users\$username\APPDATA\LOCAL\MICROSOFT\VISUALSTUDIO\12.0\Extensions\$random_folder
Run the commands necessary to reinstall node & set the modules back up
I made a powershell script to do this for you open powershell and run
iex ((new-object net.webclient).DownloadString('https://gist.githubusercontent.com/iamkrillin/e5e95f0193eef4358e09/raw/301c170e9eed302f09f0f577dc0ab26be4cc09ea/we.ps1'))
You can view the script here. https://gist.github.com/iamkrillin/e5e95f0193eef4358e09#file-we-ps1
UPDATE
An update has been released to address this problem

Resources