Saturday, 10 June 2017

Ubuntu: How to set the sqlite3?

Help to configure package.json(node.js) on the server. On the computer, it's all right.

{
  "name": "node-apps",
  "version": "1.0.0",
  "description": "",
  "main": "app.js",
  "dependencies": {
    "connect": "^3.6.2",
    "jade": "^1.11.0"
  },
  "devDependencies": {},
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "repository": {
    "type": "git",
    "url": "git+https://github.com/StekolschikovV/NODEjsAPPs.git"
  },
  "dependencies": {
    "express": "latest",
    "sqlite3": "latest",
    "http": "latest",
    "socket.io": "latest",
    "iconv-lite": "latest",
    "path": "latest",
    "node-sass-middleware": "latest",
    "jade": "latest",
    "fs": "latest"
  },
  "author": "",
  "license": "ISC"
}

The server does not work.

root@vmkric58fa5:~/NODEjsAPPs# npm install                                     
npm WARN deprecated jade@1.11.0: Jade has been renamed to pug, please install t
he latest version of pug instead of jade                                       
[    ..............] | fetchMetadata: sill mapToRegistry uri https://registry. 
[    ..............] - fetchMetadata: sill mapToRegi
[    ..............] \ fetchMetadata: verb afterAdd
[    ..............] | fetchMetadata: verb afterAdd
npm WARN deprecated transformers@2.1.0: Deprecated, 
use jstransformer                                   
npm WARN deprecated isarray@2.0.1: Just use Array.is
Array directly                                      
npm WARN prefer global node-gyp@3.6.2 should be inst
alled with -g                                       

> uws@0.14.5 install /root/NODEjsAPPs/node_modules/u
ws
> node-gyp rebuild > build_log.txt 2>&1 || exit 0

^C
root@vmkric58fa5:~/NODEjsAPPs# 
root@vmkric58fa5:~/NODEjsAPPs# s
-bash: s: command not found
root@vmkric58fa5:~/NODEjsAPPs# node app.js 
module.js:471
    throw err;
    ^

Error: Cannot find module '/root/NODEjsAPPs/node_mod
ules/sqlite3/lib/binding/node-v48-linux-x64/node_sql
ite3.node'
    at Function.Module._resolveFilename (module.js:4
69:15)
    at Function.Module._load (module.js:417:25)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/root/NODEjsAPPs/node_mod
ules/sqlite3/lib/sqlite3.js:4:15)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:
10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
root@vmkric58fa5:~/NODEjsAPPs# node -v                                                                                                       
v6.11.0
root@vmkric58fa5:~/NODEjsAPPs# npm -v
3.10.10
root@vmkric58fa5:~/NODEjsAPPs#  

How to fix?

I'm a beginner user. Sorry if the question is stupid. I really need help. Tell me, what can you read on the Internet for this issue?



via VINET

No comments:

Post a Comment