Preparing a Node.js Development Environment
Scenario
OCR Node.js SDK supports Windows, Linux, and Mac operating systems. This section uses Windows as an example to describe how to configure the environment. Table 1 describes the required operating environment.
Procedure
The following describes how to install and configure Node.js v10.13.0 in the Windows 7 environment. If you have installed Node.js v10.13.0 or later and the required library packages, skip this section.
- Configure Node.js.
Go to https://nodejs.org/en/download/ to download the latest Node.js.
Right-click Computer, choose Properties > Advanced System Settings > Environment Variables, and add C:\Program Files\nodejs (default installation path of node.exe) to Path.
- Verify Node.js.
Run the node –v command in the system CLI to check the Node.js version. If the current version number is displayed, the configuration is successful.
- Run the following command to configure cnpm and the software library.
$ npm install -g cnpm --registry=https://registry.npm.taobao.org
If you have configured them, go to 4.
- Install a dependency package.
Go to the root directory of Node.js. Press and hold down Shift, right-click in the window, and choose Open command window here from the shortcut menu. Then, run the following commands:
cnpm install request –save cnpm install moment --save cnpm install moment-timezone --save
Last Article: Preparing an Android Development Environment
Next Article: Using Java SDK
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.