node modules not found in vs code editor - node-modules

I have a standard fresh Nextjs project with typescript but somehow I get a compiler warning.
I have to add "../node_modules" extension while the node modules are in my root folder. Anyone knows how to fix this error? During a npm run dev I'm not getting any errors its just this red cringly error thats annoying me.

Found a solution:
"moduleResolution":"node" had to be added to the compileroptions in tsconfig.json

Related

Adding pubspec extension to project in root visual studio flutter

I am trying to write a code in dart and I want to add dependencies so I added 'Pubspec Assist'
extension. when I tried to use it it showed me this message:
"
Pubspec Assist: Pubspec file not found in workspace root. Open the pubspec file you would like to edit and try again. "
how do I place it in my workspace root. I'm new to dart and Vstudio and I need detailed explanation please. thanks in advance.
Easiest thing is to do as it says. Either open a project where the pubspec.yaml file is at the root, or open the file in the editor and then start Pubspec Assist.
and Sometimes you need to restart your ide or code editor for some extensions to work so try restarting your ide/code editor
Hope this was helpful enough
Below is the correct order of how your flutter project can be arranged, your pubspec.yaml file must be inside your project's directory as myproject/pubspec.yaml
and not inside any other subdirectories its the best practice which you should follow for flutter project.
and if this didnt worked out for you just try running flutter clean and then flutter create .

IntelliJ Mac - LESS Compiling with Autoprefixer

I was using a file watcher in IntelliJ which automatically compiled my less files into css files. I added an argument to the file watcher which used the autoprefix plugin to add all the prefixes to the compiled css file.
I now switched from a windows machine to mac and I can't get it to work like this there. I installed the autoprefix plugin via npm: https://github.com/less/less-plugin-autoprefix
And I set everything like it was on my windows machine: https://intellij-support.jetbrains.com/hc/en-us/community/posts/115000659610-Autoprefixer-in-file-watcher
But now I only get the error message:
"Unable to load plugin autoprefix please make sure that it is
installed under or at the same level as less"
Same error occurs when calling the compiling with plugin from the command line. LESS compiling itself is working fine.
Does anyone has an idea what I'm missing? I'm pretty new on Mac so I don't know if I miss some environment variables or something? Or how can I check where the plugin is installed and where do I have to install it?
Thanks to an answer which seems to has been deleted in the meantime I found the solution.
The current autoprefix plugin needs an older version of less. It's not compatible with less 3.0.1.
After uninstalling less and installing version 2.7.3 with
npm install -g less#2.7.3
it is working again.
Found the solution here: https://github.com/less/less-plugin-autoprefix/issues/30

npm dependencies not updating in Visual Studio Solution Explorer

I have updated my package.json in my Angular SPA .Net Core Template.
I have then right clicked on the package.json file and selected 'restore packages'.
(I get the message installing packages and then installing packages completed in the bottom left hand corner of the program with no errors).
However, when I view the dependencies under the solution explorer they are still showing the old versions? (see the picture below);
Can anyone tell me how I can get the npm in the list to match please?
Go into cmd (preferably as administrator), navigate to the folder containing the package.json, then run npm install.
If you dont see packages updating, check for a package-lock.json file in either the same folder or one folder up and delete it. Retry running the npm install again and it should work.

PhpStorm cannot load project after running npm install

In my Laravel project I want to try use npm. After running npm install and restarting PhpStorm it stuck at loading project look like this:
And my Windows 10 CPU runs high. (the dialog can not be cancelled, I have to force close it)
I have tried this:
Setting -> Editor -> File Types -- added node_modules to "Ignore files and folders".
Setting -> Directories -- marked node_modules as Excluded Folder.
Both did not work!
I have stuck in this problem in a few days, hope somebody can take sometime to help me out!
PC: Windows 10 x64
PhpStorm 2017.1.2
node.exe: v7.6.0
It may be indexing the node_modules folder. You need to remove this from the project.
If you get it to open, you can do this in PHPStorm by right clicking the folder-> Mark Directory As -> Excluded.
You could delete the contents of the folder, then do this? You can just do an npm install again after.
Mick

How fix building workspace error in Zend Studio?

How to fix building workspace problem in Zend Studio?
I'm trying to rename project and rename folder of project, however nothing:
Errors occurred during the build.
Errors running builder 'JavaScript
Validator' on project 'PROJECT'.
java.lang.NullPointerException
you must go to Project->Properties->Builders then disable ‘Javascript Validator’.
The bug has been fixed, you can either wait for the new release or apply the patch :
https://bugs.eclipse.org/bugs/show_bug.cgi?id=318004
I had similar problem and mine is that the saving workspace process try to write in one of the file and it can't even it is available under .metadata directory.
This is how I did:
Open the .metadata directory and look for that particular file, yours can be different, so
change it to read and write for this file then restart eclipse.
It fixed the problem!.
My OS: Ubuntu 10.04 , Eclipse SDK 3.5.2
Hope this help...

Resources