To learn how to manage multiple versions of IBM SDK Node.js on Windows 7, click here
This is a simple recipe to setup a IBM SDK Node.js 4.5 environment on windows 7
and install apiconnect globally.
Make sure you have all the pre-requisite as documented in IBM Knowledge center.
install IBM SDK Node.js version 4.5
To install a new version of node.js, download from IBM SDK Node.js Download URL
From the installer, choose the following options:
- Start a command line prompt and execute installer
- Select install a new instance
- Select a new installation location at C:\Users\Administrator\IBM\node45
- Specify ShortCut to new Program Group
- Press Next and review install summary and then install
- Install is done with the success completion
Choosing the IBM SDK Node.js Command Prompt
- Start Menu->All Programs
- Choose IBM SDK for Node.js (TM) 126.96.36.199 Program Group
- Expand the Program Group
- Select the Node.js Command Prompt
- Echo %PATH%
You will find that the location of Node version and NPM Prefix is setup in the path
Installing latest npm version (optional)
From the IBM SDK Node.js command prompt, run
node -v and
to confirm your version.
You will find that the default npm version is version 2.15.9. This is the official supported version from IBM
SDK Node.js runtime.
You can update to the latest npm version 3 ( 3.10.8) to resolve windows system path length limitation as suggested by npm.
npm 3 flattens the dependencies tree structures.
However, in the community, there are reports that npm 3 is slower and
there are other racing issues with npm 3.
If this works, you can proceed to install apiconnect.
If mocha show command not found, go to the Tips below.
Installing apiconnect globally
There are two ways to install apiconnect.
- From npmjs.org
npm install -g apiconnect –no-optional –ignore-scripts
- apiconnect bundle
- npm install -g apiconnect-2.3.4.tgz –no-optional –ignore-script
Note: –ignore-scripts is a temporary workaround for version 188.8.131.52
The options should not be required in future release.
After the installation completes, you should be able to execute the following:
- apic –ext-version
When run into unexpected errors during install, try the following:
- If installation shows success but command is not found.
- echo %PATH% to check your environment
- Ensure your npm prefix is in your PATH. To get npm prefix, invoke
npm config get prefix.
- The default npm prefix is C:\Users\Adminstrator\AppData\Roaming\npm
- If EPERMs issues or others install issues
- Check the npm-debug.log for further information
- npm cache clear
- Manually remove the npm-cache folder
- Close all other windows command prompt and try again
- Try to isolate your issues with back to basic environment.
IBM SDK for Node.js is the official supported version from IBM.
If you invoke the Node.js command prompt, the default location of Node and NPM Prefex will be setup in the PATH.
Try not to mix open source Node.js and IBM SDK Node.js in your environment and keep it simple.