@@ -1292,29 +1292,28 @@ installing.
1292
1292
1293
1293
### <a name =" offline " ></a > 3.12 Node-oracledb Installation Without Internet Access
1294
1294
1295
- There are two ways to install node-oracledb on computers that do not
1296
- have internet access or do not have access to the [ npm registry] [ 4 ] .
1297
- You can either do a normal install on another machine, or manually
1298
- extract the node-oracledb packages.
1295
+ There are several ways to install node-oracledb on computers that do
1296
+ not have internet access, or have no access to either the [ npm
1297
+ registry] [ 4 ] or [ github.com] [ 1 ] .
1299
1298
1300
- #### 3.12.1 Normal Install on an Intermediary Machine
1299
+ #### 3.12.1 Installing on an Intermediary Machine
1301
1300
1302
- On an identical machine that does have access, install node-oracle
1303
- following the [ Node-oracledb Installation Instructions ] ( #instructions )
1304
- for that operating system.
1301
+ On an identical machine that has access to the internet , install
1302
+ node-oracle following the [ Node-oracledb Installation
1303
+ Instructions ] ( #instructions ) for that operating system.
1305
1304
1306
1305
Then copy ` node_modules/oracledb ` and Oracle client libraries to the
1307
1306
offline computer. Windows users should see [ Copying node-oracledb
1308
1307
Binaries on Windows] ( #winbins ) and make sure the correct Visual Studio
1309
1308
Redistributable is also installed.
1310
1309
1311
- #### 3.12.2 Manual Install Using Pre-built Binaries
1310
+ #### 3.12.2 Manually Extracting Pre-built Binaries
1312
1311
1313
1312
If pre-built node-oracledb binaries are available for your version
1314
1313
of Node.js and operating system, you can install manually:
1315
1314
1316
- - On a computer that has internet access, navigate to a release on the
1317
- [ GitHub Release] [ 41 ] page.
1315
+ - On a computer that has access to github.com , navigate to a release
1316
+ on the [ GitHub Release] [ 41 ] page.
1318
1317
1319
1318
Download the release's main node-oracledb package, for example
1320
1319
` oracledb-2.0.15.tgz ` .
@@ -1354,21 +1353,25 @@ of Node.js and operating system, you can install manually:
1354
1353
|-- CHANGELOG.md
1355
1354
|-- LICENSE.md
1356
1355
|-- README.md
1356
+ |-- binding.gyp
1357
1357
|-- index.js
1358
1358
|-- lib
1359
- |-- |-- connection.js
1360
- |-- |-- lob.js
1361
- |-- |-- oracledb.js
1362
- |-- |-- pool.js
1363
- |-- |-- querystream.js
1364
- |-- |-- resultset.js
1365
- |-- |-- util.js
1366
- |-- oracledb-2.0.15.tgz
1359
+ | |-- connection.js
1360
+ | |-- lob.js
1361
+ | |-- oracledb.js
1362
+ | |-- pool.js
1363
+ | |-- querystream.js
1364
+ | |-- resultset.js
1365
+ | |-- util.js
1366
+ |-- odpi
1367
+ | |-- . . .
1367
1368
|-- package
1368
- |-- |-- extractpackage.js
1369
- |-- |-- oracledbinstall.js
1370
- |-- |-- util.js
1369
+ | |-- extractpackage.js
1370
+ | |-- oracledbinstall.js
1371
+ | |-- util.js
1371
1372
|-- package.json
1373
+ |-- src
1374
+ |-- . . .
1372
1375
```
1373
1376
1374
1377
- Locate ` node_modules/oracledb/package/extractpackage.js ` and use it
@@ -1387,6 +1390,57 @@ of Node.js and operating system, you can install manually:
1387
1390
Binaries on Windows] ( #winbins ) and make sure the correct Visual
1388
1391
Studio Redistributable is also installed.
1389
1392
1393
+ #### 3.12.3 Installing node-oracledb without GitHub Access
1394
+
1395
+ Some companies block access to github.com so ` npm install oracledb `
1396
+ will fail to download binaries, as will installing source code from
1397
+ GitHub with ` npm install oracle/node-oracledb.git#v2.0.15 ` .
1398
+
1399
+
1400
+ To install node-oracledb in this case, compile the source code
1401
+ included in the npm package:
1402
+
1403
+ - Use ` npm install -verbose oracledb ` and locate the URL it uses to
1404
+ download the node-oracledb package, for example
1405
+ ` https://registry.npmjs.org/oracledb/-/oracledb-2.0.15.tgz `
1406
+
1407
+ Download and save the package.
1408
+
1409
+ - Create a directory such as ` oracledb_build ` and extract the package
1410
+ inside it:
1411
+
1412
+ ```
1413
+ mkdir oracledb_build
1414
+ mv oracledb-2.0.15.tgz oracledb_build
1415
+ cd oracledb_build
1416
+ tar -xzf oracledb-2.0.15.tgz
1417
+ ```
1418
+
1419
+ The directory contents will be the same as shown in the previous
1420
+ section.
1421
+
1422
+ - Edit ` package.json ` and delete the line that invokes the binary
1423
+ download script:
1424
+
1425
+ ```
1426
+ "install": "node package/oracledbinstall.js",
1427
+ ```
1428
+
1429
+ - Either add a dependency on [ nan] ( https://www.npmjs.com/package/nan )
1430
+ to ` package.json ` , or manually install it:
1431
+
1432
+ ```
1433
+ npm install nan
1434
+ ```
1435
+
1436
+ - Install the build prerequisites for compilation, following the
1437
+ [ Node-oracledb Installation Instructions] ( #instructions ) .
1438
+
1439
+ - Build node-oracledb from outside the directory:
1440
+
1441
+ ```
1442
+ npm install ./oracledb_build
1443
+ ```
1390
1444
1391
1445
## <a name =" installingv1 " ></a > 4. Installing Node-oracledb 1.x
1392
1446
@@ -1398,6 +1452,8 @@ add-on you must explictly use its version when installing:
1398
1452
1399
1453
```
1400
1454
1455
+ This version always requires compilation.
1456
+
1401
1457
## <a name =" otherresources " ></a > 5. Useful Resources for Node-oracledb
1402
1458
1403
1459
Node-oracledb can be installed on the pre-built [ * Database App
0 commit comments