How to use npm package in nw.js without installing Node JS - node.js

I want to use this npm package(https://www.npmjs.com/package/node-ssh) in my nw.js application,
In my dev system installed node js and installed this package and successfully its working
, But while shipping this application I don't want to make a dependency to node js. Without installing the node js can nw.js use this package.
Any help ?

Use Gradle wrapper and the Gradle Plugin for Node.
To avoid having to install gradle, I use Spring Initializr to create a simple project that has the gradle wrapper in it. Then I'll just copy the gradle folder, the gradlew and gradlew.bat. All that's left then is to create the .gitignore and build.gradle files.

Related

NPM not installing node module

I have an angular project that comes with a package.json file and all the dependencies listed within, but each time I run "npm install", in the terminal, the packages appear to be downloading properly and a node module folder is created in my root folder, but at a certain stage the installation stops without an error message and the generated node module folder disappear from my project. please what do I do?
I can't reproduce your situation, somehow this may not fitable for you.
But I suggest re-install node.js to make sure npm install work correctly.
This link will help to find what version of node.js for you, based on you angular version.
Compatibility list for Angular/Angular-CLI and Node.js
Also, It would be good to manage node.js via NVM(Node Version Manager).

React Native project does not run

When I create new project in React Native and trying to run in android emulator then it returns error. Whats the problem i can't understand.
compare your package.json file of new created project and older project. in package.json file change all react native version of new projects to older projects. then delete node_modules folder and run npm install. then run the new project. I think it should work.
There seems to be some issue with latest react native version.
Create the project with below command.
react-native init --version="0.54.0" ProjectName

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?

I don't know why the core modules in node js are not being recognized within my project using IntelliJ Idea (2016)

I keep getting the error: Cannot find module 'serve-favicon.' This error occurs not just for serve-favicon but for all core modules which also includes 'body-parser', 'cookie-parser', etc. I am using IntelliJ IDEA (version: 2016). I already enabled the Node.js Core library, and I have been able to use core modules in other projects successfully. What is different about this project however, is that I pulled it from github. Do I need to install another plugin? If yes, which one? Do I need to add another package?
serve-favicon, body-parser, cookie-parser are not node.js core modules.
You will need to install these dependencies from npm registry. To install these dependencies, you will need to run
npm install <package-name> --save
If you have pulled the project from github, chances are there will be a package.json file with a list of dependencies. In that case, all you need to do is run npm install from the project folder.

Cross-platform script to install Node + NPM + Grunt? [duplicate]

I am looking for a nexus-compliant repository where I can get a node installer (a nexus-compliant alternative to http://nodejs.org/dist/.
Context :
In a java environment, our builds are processed by maven. Recently we add a javascript frontend app and I am trying to get it built via maven with the excellent plugin frontend-maven-plugin.
The plugin installs node and npm, then run npm install and grunt build.
Everything works perfectly.
But we MUST put all our dependencies under nexus (or some locally proxified repository).
About frontend dependencies: no problem since nexus 2.10 supports the npm registries. It works.
About the node and npm installers, they are initially downloaded from http://nodejs.org/dist/ by the plugin, and I do not know how to locally proxify this repo ... or where I can find theses installers on a nexus-compliant's one.
Any suggestions ?
Thx.
I would suggest to create a pull request/patch for the frontend plugin that allows you to add a full url for npm and node rather than just the version and the root url. Then you can host the two installed e.g. by uploading them to Nexus into a Maven 2 repository and using that URL. I filed an issue for that btw. https://github.com/eirslett/frontend-maven-plugin/issues/126
Alternatively could try to create a site repository in Nexus with the same structure and use that.

Resources