Cannot create new Nest project using yarn as a package manager - nestjs

I couldn't create a new NestJS project when doing nest new project-name using yarn as a package manager. However, whenever I chooses npm, it successfully create the directories.
My nest version is 8.1.1.
My yarn version is 1.22.11.
My npm version is 6.14.1.
My node version is 14.0.0.
I am using Windows 10 git bash mintty

Related

Jenkins using old node version to build project

I am working on an existing job that builds a project using node but it looks like it will need to run on v8.11.1 specifically.
here are the following commands we use on Jenkins:
source ~/.profile
echo 'Install required packages'
npm install -g bower gulp nodemon
npm install
bower install
echo 'Building production code'
gulp build
It build our project successfully but only uses version 6.11.2
/home/jenkins/.nvm/versions/node/v6.11.2/bin/bower -> /home/jenkins/.nvm/versions/node/v6.11.2/lib/node_modules/bower/bin/bower
/home/jenkins/.nvm/versions/node/v6.11.2/bin/gulp -> /home/jenkins/.nvm/versions/node/v6.11.2/lib/node_modules/gulp/bin/gulp.js
/home/jenkins/.nvm/versions/node/v6.11.2/bin/nodemon -> /home/jenkins/.nvm/versions/node/v6.11.2/lib/node_modules/nodemon/bin/nodemon.js
I have tried downloading node v8.11.1 to the /home/jenkins/.nvm/versions/node/, copying gulp, nodemon and bower to the bin directories and using nvm alias default v8.11.1 to switch my node versions
Though, when I run the project it always runs on the older version. What could I do to force it to run to the 8.11.1 version?
You may need to restart Jenkins for it to start using/recognize the newer version of node.

In Angular how can check node version and show message during the npm install if installed version not matched with specifed version

I am trying to define validation which check the node and cli version with specified version before going to install package.json dependencies.
Example: Suppose when I started my angular project the node and cli version was 5.2.1 and now they are updated 5.2.6 or 5.3.* but I don't want to run my app on updated version so how can I show alert/error message and exit that user who are going to install the app and there package dependencies

Running local node verison different than global with gulp and node-sass

I have a project that is using node npm and gulp. When we build the project node 5 is installed in the local directory and runs npm install (compiling all node modules agains node v5) I globally have node version 7 installed.
We have a gulp task that uses node-sass which is compiled against v5 but when I try to run the task it uses the global version and node-sass errors out out "Missing binding"
How can I run it using the local version of node?
nvm is very helpful for managing and switching between multiple versions of node, including your globally installed packages.
If you are looking to automate it, you could just add the console command to use the needed version via nvm within your gulp task.
e.g. "nvm install v5.0.0"
To expand upon #dmfay's answer, you should have node 5 installed (via nvm or tj's n).
However you can include in your package.json for the project such that it relies on node 5. (Under the "engine" property)
None of the install/rebuild solutions resolved the issue for me (using gulp).
Here is how I resolved it:
1) Download the missing binding file from the repository.
2) Rename the file binding.node.
3) Create /node-modules/vendor/<operating system>/ (for my version of node/node-sass the <operating system> directory for linux is linux-x64-64, use folder name from missing binding error message)
4) Add binding.node file to /node-modules/vendor/<operating system>/.
5) run gulp

How do I copy global modules between Node installations using nvm?

I manage my Node installations using nvm. I installed the grunt-cli module globally in my previous installation of node. This allowed me to run the command grunt on in the terminal.
When I installed a new version of Node (5.7.1), I got this error whenever I tried to execute the grunt command:
zsh: command not found: grunt
I discovered that the grunt-cli package had not been installed for the new version of Node.
I could install the grunt-cli package again but I would prefer to do this automatically whenever a new version of Node is installed using nvm.
Is there some way to install all the global modules from a previous version of Node when using nvm ?
This can be achieved using the --reinstall-packages-from option when executing nvm install. From the nvm documentation:
If you want to install a new version of Node.js and migrate npm packages from a previous version:
nvm install node --reinstall-packages-from=node
This will first use "nvm version node" to identify the current version you're migrating packages from. Then it resolves the new version to install from the remote server and installs it. Lastly, it runs "nvm reinstall-packages" to reinstall the npm packages from your prior version of Node to the new one.
If your prior version of Node is 4.3.0, the command will be executed thus:
nvm install v5.7.1 --reinstall-packages-from=4.3.0

How to do environment setup for jhipster for java development

I am new to JHipster.I have gone through all the steps for JHipster SetUp in Windows.
First Issue :
Unable to create Jhipster Project
I have followed the below steps.
1.Install Java from the Oracle website.
2.Install Maven (recommended). If you prefer to use Gradle instead, don't install it, as JHipster ships with the Gradle Wrapper.
3.Install Git from git-scm.com. We recommend you also use a tool like SourceTree if you are starting with Git.
4.Install Node.js from the Node.js website. This will also install npm, which is the node package manager we are using in the next commands.
5.Install Yeoman: npm install -g yo
6.Install Bower: npm install -g bower
7.Depending on your preferences, install either Grunt (recommended) with npm install -g grunt-cli or Gulp.js with npm install -g gulp.
8.Install JHipster: npm install -g generator-jhipster.
But i am getting errors while creating JHipster project using command prompt.
Second Issue :
How we can import the existing project from JHipster git to eclipse
I downnloaded a sample JHipster project fro git and while trying to import the same project in to workspace i am facing an error like:
jdt apt pluging is not getting in eclipse to build that project....
Rather than Juno, I would suggest using Spring Tool Suite - http://spring.io/tools/sts
It's an Eclipse distribution that bundles a comprehensive set of plugins enabling one to work with Spring projects.
I found Eclipse to be weak when working with Javascript and HTML. I switched to Intellij almost a year ago and am very happy with the decision.

Resources