Upgrade hugo version - version

How can I upgrade my hugo from version 0.55.6 to version 0.69 or 0.70?
I tried yarn add hugo#0.70 and it returns me:
yarn add v1.22.4
warning package.json: No license field
warning ../../../package.json: No license field
warning No license field
[1/4] Resolving packages...
Couldn't find any versions for "hugo" that matches "0.70"
? Please choose a version of "hugo" from this list:
❯ 0.0.3
0.0.2
0.0.1
So I am a little bit confused.

By those version numbers, it seems you want Hugo, which is a static site generator built in Go.
Yarn is a package manager for the Node.JS ecosystem, similar to npm. It manages Node/JS packages, which are usually hosted on https://www.npmjs.com/.
Some packages aren't only JS, but just add JS wrappers over some other binary. This widens the circle of potential overlap, and as there's no naming convention enforced on the NPM packages, you're bound to be mislead by a name. The hugo npm package seems to be an interface for some lighbulbs.
To install Hugo, you will probably need to install it separately. Check the Hugo installation info. If you have to use yarn, you will have to find a different package that ships the hugo binary.

Related

Depedency issues, cloned react project

I cloned a React/typescript package from GitHub, but cannot get it to work. When I do npm install, the compiler complains that my typescript version is too new:
WARNING: You are currently running a version of TypeScript which is not officially supported by #typescript-eslint/typescript-estree
Is there some way, I can use exactly the node and packages versions as listed in the package.json?
I've also tried npm install --legacy-pee-deps, but that wasn't fruitful either, still get the problem. Also, I tried setting npm config set save-exact true before installing packages.
Thanks!

Npm install not working, after updating node js

Error message screenshots
1. Photo
2.Photo
3.Photo
Version of nodejs
Based on the screenshots, you are attempting to install the node-sass package.
It's deprecated and, as you can see, depends on a binary module that needs to be compiled separately on Windows using the Visual Studio toolchain.
You have two options:
follow the instructions in the readme to also install the node-gyp prerequisites
switch your project to use the sass module (recommended).

How to upgrade package.json or react libraries automatically?

How to upgrade packages in react application automatically using commands? I don't want to manually check every library in package.json and check its latest version. I want to upgrade my package.json at one shot.
npm i -g npm-check-updates
ncu -u
npm install
Looks like npm-check-updatesis the only way to make this happen now.
Upgrading libraries, frameworks in Javascript project is surely a tiresome and complex process. However, it has much more benefits in the long run and stability .
Here are the main reasons why upgrading libraries are important:
🚀 New features: Most dependencies have a clear roadmap for new features.
🏎️ Performance improvements: In addition to new features, performance improvements are also made frequently.
🐛 Fixed bugs: Although it is normal to find bugs in libraries that you depend on, patch releases help fix these issues.
👮 Security patches: Security patches are one of the most important reasons to have your libraries up-to-date.
The manual process is too tiresome as you need to check for the latest version of each package. So make it easier we will be using two separate methods.
Using npm-check-updates
npm-check-updates upgrades your package.json dependencies to the latest versions, ignoring specified versions.
Please follow the steps below -
Install npm-check-updates
Run npm-check-updates to list what packages are out of date
Run npm-check-updates -u to update all the versions in your package.json
Run npm update as usual to install the new versions of your packages based on the updated package.json
If you do not want to install npm-check-updates in machine, you can follow the steps below-
run npx npm-check-updates (This will list down all the outdated packages in package.json)
Run ncu -u to upgrade package.json
npm install to install the packages
📌 Check your project by running the application and verifying the up-gradation. There might be issues in your code that might as part of up-gradation. In such scenario please check the release notes of the package and make the due changes in code.

Requested item is quarantined in Reactjs

I am trying to run the command npx create-react-app under a corporate registry. The problem is that the element sockjs#0.3.18 is not available and therefore it stalls the installation; however, the element sockjs#0.3.17 is. Is there any way I can run that command by specifying it should install a different version of sockjs?.
Using npm ls sockjs, I see this is a dependency of react-scripts#1.1.4 / webpack-dev-server#2.9.4
└─┬ react-scripts#1.1.4
----└─┬ webpack-dev-server#2.9.4
--------└── sockjs#0.3.18
There's an option in create-react-app to use a nonstandard version of react-scripts:
--scripts-version <alternative-package>
This should work:
npx create-react-app --scripts-version 0.9.5 app
0.9.5 is the latest version that depends on an earlier sockjs.
I found this by looking up the package.json of webpack-dev-server and then react-scripts that had appropriately downgraded versions. (I did it manually on GitHub release pages... anyone know a better tool for that?)
Alternative approaches:
Get the updated sockjs approved in your corporate registry :)
Assuming the difference between sockjs#0.3.18 and sockjs#0.3.17 is immaterial as for as create-react-app goes (no guarantees), you could probably npm install create-react-app, find the bit in the source code (node_modules/create-react-app/create-react-app.js) that downloads react-scripts, and hack it to point to your own fork of the latest react-scripts with a changed version number for webpack-dev-server (1.16.4). Not recommended!

How to install the latest versions of a group of NPM packages so that they are compatible to each other?

I would like to install all the npm packages from this list:
#angular/common, #angular/compiler, #angular/core, #angular/forms, #angular/http, #angular/platform-browser, #angular/platform-browser-dynamic, #angular/router, #angular/router-deprecated, #angular/upgrade, systemjs, core-js, reflect-metadata, rxjs, zone.js, angular2-in-memory-web-api, es6-promise, es6-shim, jquery, bootstrap
Yes, it's quite a bit of packages. So how do I install the latest possible versions that are supposed to work with each other (assuming I can trust the declared dependency versions in npm package metadata)?
How do I:
go to Quickstart
scroll to configuration files
copy/paste from tab "package.json" (see "dependencies" section)

Resources