Can i setup Angular 6 without using/installing node.js/npm? - node.js

I know there is an easy solution with Angular CLI but is it possible to setup and run an Angular app without installing Node.js or running npm commands in the terminal.
Any suggestions would be appreciated.

Not really, no. Angular has a complicated build process that isn't realistically doable without having Node installed. If you really can't/won't install NodeJS, perhaps try an online IDE such as stackblitz.

I think it's impossible to build an app with Angular and without Node if you want to use Local IDE like VSCode
It's not recommended for sure. the best alternative way is to use yarn + Angular CLI.
You can use Online IDE if you won't install node and npm on your machine. (http://stackblitz.com)
Yarn is an alternative package manager for npm, so you can use it.
Update to use Yarn with Angular CLI
ng set --global packageManager=yarn
and to revert this change :
ng set --global packageManager=npm

Related

Can i use yarn instead of npm?

I'm super new to node and coding in general so please forgive me. I am trying to use weld scraping service, but I am using npm. To run, it says to use a yarn command: yarn dev # development . Is there a way I can run the same command with npm? I tried npm install dev # development, but it threw an error for the #. I tried downloading the contents of the repository first and then running, and got the same result. I tried researching what # means in yarn, or in terminal, and the only thing I found is in a shell script it shows that you are the superuser?
...Yarn can consume the same package.json format as npm, and can install any package from the npm registry.
https://classic.yarnpkg.com/en/docs/migrating-from-npm/
First of all Yarn is a package manager created by Facebook as an alternative to npm. It looks like the package you are trying to install can not be installed with npm. "npm install dev # development" will not work because it is not the format used by npm when you are trying to install some package. If the objective is to scrape a web site I recommend you to use some other popular npm packages as axios cheerio. You can use "npm install axios cheerio" to use them.

Different NPM version used when generating React app

When I try to create the starter React tutorial app using powershell, I get the below error:
"You are using npm 2.15.12 so the project will be boostrapped with an old unsupported version of tools".
"Please update to npm 3 or higher for a better, fully supported experience".
However, my NPM version is 6.11.3 as seen below.
What I have tried:
I have ran powershell as admin as answered in this question and restart.
I have also uninstalled and reinstalled Nodejs completely.
So after an extra hour digging around, I saw a few posts with similar (but not exactly) the same issue. I decided to install Yarn and install with that.
After install, I ran yarn cache clean and ran npx create-react-app your-app and it worked. Sorry for bothering you all.
I had the same problem. I'm running WSL with ubuntu, and yarn cache clear didn't work, but I noticed a node modules directory created in the project. I think it was messing with the node version so I deleted it. It worked

Angular2 development Without node and npm

I am new angular2 development, and what i came to know is before starin the angular2 development, I must install the nodejs for server and npm to download dependencies from official documentation.
I succesfully deployed the source code in tomcat sever[by build]
So my Question is after installation and creating the new project, i got node_modules. By using these node_modules(can i start development of angular2 on another i.e a new machine where node & npm is not installed)
Basically my question is.. I want to start development of angular2 by using the project structure on new machine. Without the installation on node & npm
From Angular docs
Node.js and npm are essential to Angular development.
If you built/compiled the app and have all the modules installed (you have your node_modules) folder then its just javascript and html which you can run on any server you want.
For npm, if you need any modules/packages, I think you can manually download the package and add it to your development environment. But what if the process needs to be automated? You can't just sit there and download all the packages from github. So npm is really helpful when it come to this. You only need a file containing all dependencies, and run it at build time (package.json)
About nodejs, nodejs allows you to run javascript on the server when you need any interaction with the database. So why don't we just go with the easy way?

What is the difference between node.js runtime and npm package manager options while installing node.JS?

I am trying to install node.js by downloading the .exe file, I am confused and stuck on the Node.js setup where in it asks to install node.js runtime or npm package manager so I want to proceed through the installation after knowing fully the difference between the two.
My question is what is the difference between node.js runtime and npm
pacakage manager and what are all the features do I get on the two
options.
My basic purpose of installing node.js is to compile Typescript, Please help me to understand the features of the two package
First of all, it does not ask you to install Node.js runtime OR npm package manager, it offers you to install them both (if you want)
Now, Node.js runtime is basically what will understand your javascript code and execute it to produce a result.
Npm package manager is a tool which will allow you to install third party libraries (other people's code) by using the command line.
npm install express
will install the framework called express for example.
Node JS
Node.js is a platform built on Chrome's JavaScript runtime for easily
building fast, scalable network applications.
Real-Time services (Chat, Games etc)
NPM
Npm is a package manager. Typically this software is installed to
build Node applications.
It let's you install software (libraries, plugins, frameworks and
applications).
Node.js or Node is an open-source, cross-platform, JavaScript runtime environment(JSRE) that executes JavaScript code outside of a web browser.
npm is a package manager(like Nuget package manager in .NET -Microsoft ) for the JavaScript programming language. It is the default package manager for the JavaScript runtime environment Node.js.
You can differentiate them by finding their version using below code.
node --version
npm --version
node is a framework that can run JavaScript code on your machine while npm is a package manager. Using npm we can install and remove javascript packages also known as node modules. Now, it is not a rule that you should use npm to install and remove node modules. We can use yarn also. npm and yarn are capable of the following:
Read and understand package.json file
Download and put javascript modules in node_modules folder.
Run scripts mentioned in package.json such as starting a node server, running in dev and production mode, running scripts for unit testing etc.
npm by default run node server.js; if you didn't specify scripts in the package.json
"scripts": {
"start": "node your-script.js"
}
Which means npm run node
if you need use yarn, you'd better choose node.js runtime, usually the default choice is a better one for beginner //TAT

Meteor: Cannot find module 'angular'

I'm newbie on Meteor.
After one week on it, and started by implementing the todo of the tutorial as describe here, every things was good locally.
just the fact that I'm continually trying to deploy it, but my heroku
link(https://tasktor.herokuapp.com) just show a blank page with
the this error in de debugger:
Error: angular#^1.2.27 not installed. tmeasday_check-npm-versions.js:66:11
Error: Cannot find module 'angular'
Note that everything is clean on http://localhost:3000.
Already try a lot of solutions, as:
meteor add angular
meteor npm install --save angular
Disable minification of Js and Css.
This is the repository of this app deployed to heroku: https://github.com/dassiorleando/tasktor
his buildpack: https://github.com/dassiorleando/heroku-buildpack-meteor,
it is a buildpack with an updated Node Engine(4.5.0), that allowed to run an app with the meteor 1.4.X version.
Knowing that I add Angular-Material after finish this tutorial, because I wanted to have a clean material design style on my todo. You can check the repository to look about.
How can I handle this situation ?
Thanks in advance.
Doing this:
meteor add angular
Adds an old atmosphere angular-meteor package, which also refers to an old (1.2.27) version of angular. The best way to proceed is to remove this and just use angular npm packages. You will need these packages
pbastowski:angular-babel
urigo:static-templates
dotansimha:accounts-ui-angular
The last one is if you are using the accounts package.
The tutorial at https://www.angular-meteor.com/tutorials/socially/angular1/bootstrapping recommends this:
So let's remove it by running:
$ meteor remove blaze-html-templates
$ meteor remove ecmascript
Now let's add the Angular 1 package to Meteor, back in the command
line, launch this command:
$ meteor npm install --save angular angular-meteor babel-runtime
$ meteor add angular-templates pbastowski:angular-babel
That's it! Now we can use Angular 1's power in our Meteor app.

Resources