Build KML branch of cesium - node.js

I am trying to install the kml branch of Cesium on my local windows machine and I am following instructions to install it from https://github.com/AnalyticalGraphicsInc/cesium/wiki/Contributor's-Guide. I have jdk1.8 installed and node.js installed on my system. I am new to node.js. When I try to build the code I am getting following message. What am I missing in this?
C:\xampp\htdocs\cesium-kmz>.\Tools\apache-ant-1.8.2\bin\ant combine runServer
Buildfile: C:\xampp\htdocs\cesium-kmz\build.xml
build:
checkForNode:
[exec] Execute failed: java.io.IOException: Cannot run program "node": Crea
teProcess error=2, The system cannot find the file specified
BUILD FAILED
C:\xampp\htdocs\cesium-kmz\build.xml:296: Node.js is required to run this part of the build. Install from http://nodejs.org/
Total time: 3 seconds
Thanks in advance!

It looks like the node executable is not in your PATH. Did you select that option at Node install time? Also, did you run npm install successfully before running ant?

Related

Contentful UI Extension Tutorial

I am trying to follow the UI Extensions Tutorial
At time code 02:36 I run the npm install && npm run login && npm run configure && npm run start command.
Afterwards I get the error: Cannot find module 'E:\Dev\Contentful\my-first-sidebar\node_modules\#contentful\contentful-extension-scripts\lib\index.js'.
I have globally re-installed the CLI and re-run the install/start command but still same error. I have also searched my hard drive for the contentful-extension-scripts\lib\ folder.
I see I have a contentful-extensions-scripts and contentful-extensions-scripts.cmd files and tried to run the cmd file but no use.
I am running on a Windows 10 box. Node version: 10.16.3​, Npm version: 6.9.0
UPDATE
I found the GitHub Repo for contentful-extensions-scripts, cloned it and copied over the folder but now I get the error: Cannot find module 'parcel-bundler' and I am out of my depth.
Add the following line to package.json to fix it:
"#contentful/contentful-extension-scripts": "^0.14.0".

Jenkins NodeJS plugin: can't execute 'node'

When using the NodeJS tool on a slave that is configured with a global package, the following error is given:
env: can't execute 'node': No such file or directory
If the build runs on an executor in master, there is no error and the package is installed as expected.
I am using the kubernetes plugin with jenkins/jnlp-slave:3.27-1 as the slave image.
Jenkins Version: 2.164.2
Kubernetes Plugin: 1.14.9
NodeJS Plugin: 1.2.9
Note: This is not a duplicate of Jenkins - env: ‘node’: No such file or directory as I am not using the alpine image as was the problem in that question.
Same issue on my Jenkins.
The "download from nodejs.org" installer extracts the node package into a local directory.
It will then run "npm install -g" for each of the packages listed in the "Global npm packages to install" field in the NodeJS installer configuration ("Global tool configuration").
However, it does that before setting the system PATH to the directory where it extracted node, so npm will not find node.
I'm convinced that's a bug in the NodeJS Jenkins plugin. Your options are, as agusluc said, creating a custom jnlp-slave image (which is what I did), or file a bug with the developer of the plugin and hope it will be fixed.

'webdriver-manager start' step is getting stuck while executing in cmd

After installing protractor and trying to execute: webdriver-manager start in the command terminal, the following error is thrown:
[17:39:27] I/start - seleniumProcess.pid: undefined
[17:39:27] W/start - Selenium Standalone server encountered an error: Error: spawn cmd ENOENT.
I pasted the latest chrome driver, gecko driver and selenium standalone in npm\node_modules\protractor\node_modules\webdriver-manager\selenium, So I did not execute webdriver-manger update within the command terminal.
I am not able to resolve this issue, any help would be greatly appreciated!
ENOENT errors indicate that your program wasn't able to find the necessary entity to proceed in execution, usually this is a file, directory, symlink, pipe, etc...
In your particular case it couldn't find: the Selenium Standalone server binary
This is because instead of following protractor documentation and executing webdriver-manager update to get the necessary binaries to start a Selenium server you simply pasted the binaries in a location that you thought protractor would use to find said binaries. This location is incorrect, so you're unable to start the Selenium server properly. You can see where global npm_modules are installed on your system by executing a: npm list -g.
Typically this on Unix based systems this location is: /usr/local/lib/node_modules
And on Windows:
%USERPROFILE%\AppData\Roaming\npm\node_modules
In order to resolve this issue I would recommend you follow the documentation as it's stated or search through protractor's source code to see where the binaries are actually stored.
Maybe you could try the following and see if this helps resolve your issue, directly from their documentation:
Use npm to install Protractor globally with:
npm install -g protractor
This will install two command line tools, protractor and webdriver-manager. Try running protractor --version to make sure it's working.
The webdriver-manager is a helper tool to easily get an instance of a Selenium Server running. Use it to download the necessary binaries with:
webdriver-manager update
Now start up a server with:
webdriver-manager start
This will start up a Selenium Server and will output a bunch of info logs.
Hopefully that helps!
just add to your PATHs C:\Windows\System32

How to install a node.js package using npm

I need help trying to install a node.js package from Github using the npm command prompt. It's an adaptive grid Jquery plugin called Masonjs: https://github.com/DrewDahlman/Mason.
It's my first time to use node.js, hence the difficulty understanding the setup instructions. I've CD'd to the project folder and run the 'install npm' and 'install bower' steps successfully, but I don't understand how to complete the remaining steps: running and building Gulp (is building necessary?).
Any help would be very much appreciated.
If you just want to use masonjs library in your project, you don't need to run gulp commands for running and building. Just cd into your project directory where you have initialized npm/bower and run npm install masonjs / bower install masonjs.
The next step would be to add the mason.js file in your index page. Now there would be different folder structure in which this mason.js file is present.
In case of npm module the path would be {your-project-directory}/node_modules/masonjs/lib
And in case of bower components the path would be {your-project-directory}/bower_components/MasonJS/dist
Now just use this library and it will work perfectly.

What location does Node.js needs to be installed

I am trying to setup a project to work with Grunt. I need to install Node.js for that to run. I have downloaded and installed Node.js in c:\programfiles.
However when I try running npm install in my project c:\Grunt-proj , I get an error 'npm' is not recognized as an internal or external command.
Can someone help me with where to install Node.js? I am trying to follow this tutorial-
http://24ways.org/2013/grunt-is-not-weird-and-hard/
Many thanks,
The location is fine. I also have installed it in Program Files. But if you need to run the command npm from a command prompt then you need to add it to the path of the system. In my case I have C:\Program Files\nodejs

Resources