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.
Related
I have a MFE that is published as an npm package. The mfe is rendered inside a webview. I use Visusal studio to build local versions of the iOS app. When using regular npm install, the svg's get bundled and are fine, but when i use npm link to test my local changes, the are not bundled into the application output folder. There are two PNG's in the same folder that get bundled just fine in both instances. What could be causing this issue ?
Tried opening the resources folder of the built app with finder, confirmed the svgs are not in there.
EDIT: I noticed the two builds are trying to retrieve the svg from different file paths ? not sure why this would be the case
the build using npm link tries to get call to this path
file:///private/var/containers/Bundle/Application/?xxsxasx-xxxx-4D33-A6E9-xxxxxxxxxxxxxx/Redbox.iOS.app/825a932aef6026942803.svg
while the npm i build gets a 200 from this path
data:image/svg+xml, %3csvg width='24' height='24' vi … fill='%23007239'/%3e %3c/svg%3e
working (using npm i)
not working (using npm link)
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
I recently downloaded the three.js-master files which included the three.js editor. How do you run the editor from the files?
Ensure node.js is installed.
Open a console and navigate to the root directory of the repository.
Execute npm i to install package and its dependencies.
Start a local dev server via npm start.
Open the editor via http://localhost:8080/editor/.
I moved to a new machine (both macOs) with my two Javascript Projects, one npm package and one Meteor project. In the npm package eslint does not show any errors, whereas in the Meteor project eslint works as expected. On my old machine, there wasn't such a problem with exact the same package.json and .eslintrc and VS code version.
What I tried till now:
Adding these lines to settings.json of VS code:
"eslint.validate": [
"vue",
"html",
"javascript",
"js",
"typescript",
"javascriptreact",
"typescriptreact"
],
I even copied the complete settings.json to the new machine
Installing eslint globally and uninstall it (neither brought the solution)
Updating eslint from 3.19.0 -> 7.1.0
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