You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am unable to install/start this application:
First, a dependency was missing, I had to do:
$ npm install nodemon
After that, I run into troubles:
$ npmstart
> test_task@1.0.0 start /Downloads/register-user
> nodemon index.js
[nodemon] 1.19.1
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: *.*
[nodemon] starting `node index.js`
module.js:550
throw err;
^
Error: Cannot find module '/Downloads/register-user/node_modules/sqlite3/lib/binding/node-v57-linux-x64/node_sqlite3.node'
at Function.Module._resolveFilename (module.js:548:15)
at Function.Module._load (module.js:475:25)
at Module.require (module.js:597:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/Downloads/register-user/node_modules/sqlite3/lib/sqlite3.js:4:15)
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
[nodemon] app crashed - waiting for file changes before starting...
$ nodejs --version
v8.16.0
I also tried with an older version of nodejs, which causes:
# npm start
> test_task@1.0.0 start /root/register-user
> nodemon index.js
[nodemon] 1.19.1
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: *.*
[nodemon] starting `node index.js`
/root/register-user/index.js:8
let exists = fs.existsSync(dbFile);
^^^
SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:373:25)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Function.Module.runMain (module.js:441:10)
at startup (node.js:140:18)
at node.js:1043:3
[nodemon] app crashed - waiting for file changes before starting...
The text was updated successfully, but these errors were encountered:
This issue seems to be related to the node version (I used ^10.). More precisely, it seems to be connected to node-pre-gyp : ref: node_sqlite3.node #906.
If using node v8.16.0 I suggest running npm rebuild. This worked for me:
$ npm start
> test_task@1.0.0 start [...]/test-task
> nodemon index.js
[nodemon] 1.19.1
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: *.*
[nodemon] starting `node index.js`
body-parser deprecated undefined extended: provide extended option index.js:15:17
Created new table Users
Server: Listening on port 3000
$ node --version
v8.16.0
I also added 'use strict';, which should resolve the older node version problem.
Hello tihawk,
I am unable to install/start this application:
First, a dependency was missing, I had to do:
$ npm install nodemon
After that, I run into troubles:
I also tried with an older version of nodejs, which causes:
The text was updated successfully, but these errors were encountered: