NodeJS + AppJS + Sqlite3 - sqlite

I am trying to build the SQLite3 module into my project.
If I run NPM install sqlite3 it fails. Here is my npm-debug.log relevant:
235 info install sqlite3#2.1.5
236 verbose unsafe-perm in lifecycle true
237 silly exec cmd "/c" "node-gyp rebuild"
238 silly cmd,/c,node-gyp rebuild,C:\NodeWorkbench\AppJS Workspace\template\data\node_modules\sqlite3 spawning
239 info sqlite3#2.1.5 Failed to exec install script
240 info C:\NodeWorkbench\AppJS Workspace\template\data\node_modules\sqlite3 unbuild
241 verbose from cache C:\NodeWorkbench\AppJS Workspace\template\data\node_modules\sqlite3\package.json
242 info preuninstall sqlite3#2.1.5
243 info uninstall sqlite3#2.1.5
244 verbose true,C:\NodeWorkbench\AppJS Workspace\template\data\node_modules,C:\NodeWorkbench\AppJS Workspace\template\data\node_modules unbuild sqlite3#2.1.5
245 info postuninstall sqlite3#2.1.5
246 error sqlite3#2.1.5 install: `node-gyp rebuild`
246 error `cmd "/c" "node-gyp rebuild"` failed with 1
247 error Failed at the sqlite3#2.1.5 install script.
247 error This is most likely a problem with the sqlite3 package,
247 error not with npm itself.
247 error Tell the author that this fails on your system:
247 error node-gyp rebuild
247 error You can get their info via:
247 error npm owner ls sqlite3
247 error There is likely additional logging output above.
248 error System Windows_NT 6.1.7600
249 error command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "sqlite3"
250 error cwd C:\NodeWorkbench\AppJS Workspace\template\data
251 error node -v v0.8.14
252 error npm -v 1.1.65
253 error code ELIFECYCLE
254 verbose exit [ 1, true ]
I have node-gyp installed, as well as python (3.3 I believe). Thanks for the help. I really need this resolved ASAP, so if you could point me in a direction I would appreciate it greatly!
Ideally, I would like to use Nano and couchdb for my project. JSON from front to back would be great. But nano was throwing C++ exceptions during run time so I had to recompile the stack and start over (it recompiled AppJS when I installed nano which I assume put some faulty extensions in and messed up the whole works) My stack is as follows:
Database > AppJS (NodeJS included in this) > SocketIO > AngularJS
The point of this project is to assemble a stack that I can use as a replacement for server2go. My company has had severe stability issues regarding server2go, including data loss and DB corruption (MyISAM with MySQL).

Found a great solution. Persist works perfectly with AppJS, and has a great non-blocking sqlite3 driver. Just in case anyone else was wondering

Related

brew install mariadb fails as system can not chown for auth_pam_tool

brew
brew install not work. this is the log.
% brew install mariadb
==> Downloading https://homebrew.bintray.com/bottles/mariadb-10.4.13.mojave.bottle.tar.gz
Already downloaded: /Users/shingo/Library/Caches/Homebrew/downloads/d56104142081a8230646ac3f245adf2414e515cd5f2aeeb0637614e9966e882c--mariadb-10.4.13.mojave.bottle.tar.gz
==> Pouring mariadb-10.4.13.mojave.bottle.tar.gz
==> /usr/local/Cellar/mariadb/10.4.13/bin/mysql_install_db --verbose --user=shingo --basedir=/usr/local/Cellar/mariadb/10.4.13 --datadir=/usr/local/var/mysql --tmpdir=/tmp
Last 15 lines from /Users/shingo/Library/Logs/Homebrew/mariadb/post_install.01.mysql_install_db:
shell> /usr/local/Cellar/mariadb/10.4.13/bin/mysql -u root mysql
mysql> show tables;
Try 'mysqld --help' if you have problems with paths. Using
--general-log gives you a log in /usr/local/var/mysql that may be helpful.
The latest information about mysql_install_db is available at
https://mariadb.com/kb/en/installing-system-tables-mysql_install_db
You can find the latest source at https://downloads.mariadb.org and
the maria-discuss email list at https://launchpad.net/~maria-discuss
Please check all of the above before submitting a bug report
at http://mariadb.org/jira
Warning: The post-install step did not complete successfully
You can try again using `brew postinstall mariadb`
==> Caveats
A "/etc/my.cnf" from another install may interfere with a Homebrew-built
server starting up correctly.
MySQL is configured to only allow connections from localhost by default
To start mariadb:
brew services start mariadb
Or, if you don't want/need a background service you can just run:
mysql.server start
==> Summary
🍺 /usr/local/Cellar/mariadb/10.4.13: 744 files, 169.9MB
I have tried to execute mysql_install_db
I have tried to execute mysql_install_db without brew. this is the log.
The brew displays only the last 15 lines, so I can't help it.
% /usr/local/Cellar/mariadb/10.4.13/bin/mysql_install_db --verbose --user=shingo --basedir=/usr/local/Cellar/mariadb/10.4.13 --datadir=/usr/local/var/mysql --tmpdir=/tmp
chown: /usr/local/Cellar/mariadb/10.4.13/lib/plugin/auth_pam_tool_dir/auth_pam_tool: Operation not permitted
Couldn't set an owner to '/usr/local/Cellar/mariadb/10.4.13/lib/plugin/auth_pam_tool_dir/auth_pam_tool'.
It must be root, the PAM authentication plugin doesn't work otherwise..
Installing MariaDB/MySQL system tables in '/usr/local/var/mysql' ...
2020-05-29 22:13:03 0 [Note] /usr/local/Cellar/mariadb/10.4.13/bin/mysqld (mysqld 10.4.13-MariaDB) starting as process 45440 ...
2020-05-29 22:13:03 0 [ERROR] /usr/local/Cellar/mariadb/10.4.13/bin/mysqld: option '--innodb-large-prefix' requires an argument
2020-05-29 22:13:03 0 [ERROR] Parsing options for plugin 'InnoDB' failed.
2020-05-29 22:13:03 0 [ERROR] /usr/local/Cellar/mariadb/10.4.13/bin/mysqld: unknown variable 'mysqlx-bind-address=127.0.0.1'
2020-05-29 22:13:03 0 [ERROR] Aborting
Installation of system tables failed! Examine the logs in
/usr/local/var/mysql for more information.
The problem could be conflicting information in an external
my.cnf files. You can ignore these by doing:
shell> /usr/local/Cellar/mariadb/10.4.13/bin/mysql_install_db --defaults-file=~/.my.cnf
You can also try to start the mysqld daemon with:
shell> /usr/local/Cellar/mariadb/10.4.13/bin/mysqld --skip-grant-tables --general-log &
and use the command line tool /usr/local/Cellar/mariadb/10.4.13/bin/mysql
to connect to the mysql database and look at the grant tables:
shell> /usr/local/Cellar/mariadb/10.4.13/bin/mysql -u root mysql
mysql> show tables;
Try 'mysqld --help' if you have problems with paths. Using
--general-log gives you a log in /usr/local/var/mysql that may be helpful.
The latest information about mysql_install_db is available at
https://mariadb.com/kb/en/installing-system-tables-mysql_install_db
You can find the latest source at https://downloads.mariadb.org and
the maria-discuss email list at https://launchpad.net/~maria-discuss
Please check all of the above before submitting a bug report
at http://mariadb.org/jira
I noticed that the system can not chown for auth_pam_tool because Operation not permitted.
auth_pam_tool permission
this is my permission the directory.
% ls -l /usr/local/Cellar/mariadb/10.4.13/lib/plugin/auth_pam_tool_dir/auth_pam_tool
-r-xr-xr-x 1 shingo staff 13608 5 10 04:28 /usr/local/Cellar/mariadb/10.4.13/lib/plugin/auth_pam_tool_dir/auth_pam_tool
How to fix Operation not permitted?
Or is there any other reason why it cannot be installed?
Self resolved.
Anyway I gave it try start
Even though the installation was not successful, anyway I gave it try % mysql.server start.
A error log file was created.
A error log file was created by starting mysql server.
the error log shows:
2020-05-30 8:47:10 0 [Warning] InnoDB: innodb_open_files 300 should not be greater than the open_files_limit 256
2020-05-30 8:47:10 0 [ERROR] /usr/local/Cellar/mariadb/10.4.13/bin/mysqld: unknown variable 'mysqlx-bind-address=127.0.0.1'
2020-05-30 8:47:10 0 [ERROR] Aborting
An unknown value in the mysqlx-bind-address seems to be causing the error.
How to fix unknown variable
I found
the same error question. This question discussed a my.conf file.
~/.my.conf did not exist on my mac
/etc/my.conf did not exist on my mac
this question teach me the my.conf location.
Finally I found my.conf in /usr/local/etc/my.cnf.Certainly the settings for mysqlx-bind-address were written in my.conf.
So rm /usr/local/etc/my.cnf, then brew reinstall SUCCESS!.
The permission was irrelevant at all.
this work for me:
rm /opt/homebrew/etc/my.cnf

Cannot run .NET Core Angular app through WSL

I am trying to learn the basics of .NET Core and I have installed the .NET SDK 2.2 for Linux (I am using Windows Subsystem for Linux). I want to build a Web App with the Angular framework, so I got this GitHub repository on my machine with these two commands:
$ dotnet tool install -g web
$ web new angular-spa ProjectName
Now, basically the next step would be a simple
npm run dev
but when I try this in bash, I get some errors:
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'dev' ]
2 info using npm#3.5.2
3 info using node#v8.10.0
4 verbose run-script [ 'predev', 'dev', 'postdev' ]
5 info lifecycle my-app#0.0.0~predev: my-app#0.0.0
6 silly lifecycle my-app#0.0.0~predev: no script for predev, continuing
7 info lifecycle my-app#0.0.0~dev: my-app#0.0.0
8 verbose lifecycle my-app#0.0.0~dev: unsafe-perm in lifecycle true
9 verbose lifecycle my-app#0.0.0~dev: PATH: /usr/share/npm/bin/node-gyp-bin:/mnt/c/Users/rober/OneDrive/Dev Place/Developer Place/C#/dotnetWSL/angularAPP/AngularApp/MyApp/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/mnt/c/Windows/System32:/mnt/c/Windows:/mnt/c/Windows/System32/wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0:/mnt/c/Windows/System32/OpenSSH:/mnt/c/Program Files/Microsoft VS Code/bin:/mnt/c/Program Files (x86)/Wolfram Research/WolframScript:/mnt/c/Users/rober/AppData/Local/Microsoft/WindowsApps:/mnt/c/Users/rober/AppData/Local/hyper/app-3.0.2/resources/bin:/mnt/c/Users/rober/AppData/Local/GitHubDesktop/bin:/snap/bin:/home/basavyr/.dotnet/tools
10 verbose lifecycle my-app#0.0.0~dev: CWD: /mnt/c/Users/rober/OneDrive/Dev Place/Developer Place/C#/dotnetWSL/angularAPP/AngularApp/MyApp
11 silly lifecycle my-app#0.0.0~dev: Args: [ '-c', 'ng build --aot --watch' ]
12 silly lifecycle my-app#0.0.0~dev: Returned: code: 1 signal: null
13 info lifecycle my-app#0.0.0~dev: Failed to exec dev script
14 verbose stack Error: my-app#0.0.0 dev: `ng build --aot --watch`
14 verbose stack Exit status 1
14 verbose stack at EventEmitter.<anonymous> (/usr/share/npm/lib/utils/lifecycle.js:232:16)
14 verbose stack at emitTwo (events.js:126:13)
14 verbose stack at EventEmitter.emit (events.js:214:7)
14 verbose stack at ChildProcess.<anonymous> (/usr/share/npm/lib/utils/spawn.js:24:14)
14 verbose stack at emitTwo (events.js:126:13)
14 verbose stack at ChildProcess.emit (events.js:214:7)
14 verbose stack at maybeClose (internal/child_process.js:925:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
15 verbose pkgid my-app#0.0.0
16 verbose cwd /mnt/c/Users/rober/OneDrive/Dev Place/Developer Place/C#/dotnetWSL/angularAPP/AngularApp/MyApp
17 error Linux 4.4.0-17763-Microsoft
18 error argv "/usr/bin/node" "/usr/bin/npm" "run" "dev"
19 error node v8.10.0
20 error npm v3.5.2
21 error code ELIFECYCLE
22 error my-app#0.0.0 dev: `ng build --aot --watch`
22 error Exit status 1
23 error Failed at the my-app#0.0.0 dev script 'ng build --aot --watch'.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the my-app package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error ng build --aot --watch
23 error You can get information on how to open an issue for this project with:
23 error npm bugs my-app
23 error Or if that isn't available, you can get their info via:
23 error npm owner ls my-app
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]
From what I see here, the npm or node versions are not the latest ones, however, I did an update today just to make sure and the issue is still here.
I would appreciate any help. Please remember that I am new to the concept of .NET web apps and my experience with Angular is also minimal: I recently started to get familiarized.

ArangoDB start failing in centos6

ArangoDB start in failing with the following error in centos6. I'm using latest arangodb version arangodb3-3.3.16-1.x86_64.rpm
[root#vm1 RPM]# service arangodb3 start
Starting /usr/sbin/arangod: : arena 0 background thread creation failed (13)
/etc/init.d/arangodb3: line 43: 3576 Segmentation fault $ARANGO_BIN --uid arangodb --gid arangodb --server.rest-server false --log.foreground-tty false --database.check-version
FATAL ERROR: EXIT_CODE_RESOLVING_FAILED for code 139 - could not resolve exit code 139
[root#vm1 RPM]#
Any help will be really appreciable.
The exit code 139 = 128 + 11 means that the Arangod process crashed with a segmentation violation
Can you try the following:
Check your server for a faulty memory bank
Run a memory test with memtester
This should fix the problem
There was a similar issue that has been raised on GitHub: https://github.com/arangodb/arangodb/issues/2329

chocolatey timed out waiting for the command to finish. [METEORJS]

Just for a trial I got my hands dirty installing Meteor 1.6 using Chocolatey.
When I ran the command 'choco install meteor', after little time, I receive error below
Downloading meteor 64 bit
from 'https://packages.meteor.com/bootstrap-link?arch=os.windows.x86_64'
Progress: 48% - Saving 83.27 MB of 171.74 MB C
hocolatey timed out waiting for the command to finish. The timeout
specified (or the default value) was '2700' seconds. Perhaps try a
higher `--execution-timeout`? See `choco -h` for details.
The install of meteor was NOT successful.
Error while running 'C:\ProgramData\chocolatey\lib\meteor\tools\chocolateyinstal
l.ps1'.
See log for details.
Chocolatey installed 1/2 packages. 1 packages failed.
See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
Failures
- meteor (exited -1) - Error while running 'C:\ProgramData\chocolatey\lib\meteo
r\tools\chocolateyinstall.ps1'.
See log for details.
By default, Chocolatey has a command timeout of 45 minutes (2700 seconds) as documented here:
https://chocolatey.org/docs/chocolatey-configuration#general
Is the download of the meteor installer taking longer than this?
If so, you can change the value using a command similar to this:
choco config set --name <nameFromBelow> --value <value>
i.e. in your case (again, as an example):
choco config set --name commandExecutionTimeoutSeconds --value 5400
Or, if you only want this timeout to apply to a single command, you can try:
choco install meteor --execution-timeout 5400
As mentioned in the error output.

Need help on npm start: 'serve' spawn error - code ELIFECYCLE

I run into error when I tried to host Google Analytics's demo site locally.(https://github.com/googleanalytics/ga-dev-tools)
Please help. Thanks a lot.
I have absolutely no programming / dev background (1st time using Github) and after many hours of struggling I finally made it to this last step, yet still not able to host the site myself.
Tried to update npm and node.js version to the latest but still not working. The first lines of error seeing on command prompt is:
Starting 'serve'...
'serve' errored after 6.62ms
Error: spawn UNKNOWN
Looking for a solution. The log is below:
0 info it worked if it ends with ok
1 verbose cli [ 'C:\Program Files\nodejs\node.exe',
1 verbose cli 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js',
1 verbose cli 'start' ]
2 info using npm#4.2.0
3 info using node#v7.8.0
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle ga-dev-tools#~prestart: ga-dev-tools#
6 silly lifecycle ga-dev-tools#~prestart: no script for prestart, continuing
7 info lifecycle ga-dev-tools#~start: ga-dev-tools#
8 verbose lifecycle ga-dev-tools#~start: unsafe-perm in lifecycle true
9 verbose lifecycle ga-dev-tools#~start: PATH: C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin;c:\GitHub\ga-dev-tools\node_modules.bin;c:\program files\graphicsmagick-1.3.25-q16;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files\Google\Cloud SDK\google-cloud-sdk.install.backup\platform\bundledpython\Scripts;C:\Program Files\GraphicsMagick-1.3.25-Q16;C:\Program Files\Google\Cloud SDK\google-cloud-sdk\bin;C:\Users\Administrator\AppData\Local\GitHub;C:\Program Files\Git\cmd;C:\Program Files\Git;C:\Program Files\nodejs;;C:\Program Files\Google\Cloud SDK\google-cloud-sdk\bin;C:\Users\Administrator\AppData\Roaming\npm
10 verbose lifecycle ga-dev-tools#~start: CWD: c:\GitHub\ga-dev-tools
11 silly lifecycle ga-dev-tools#~start: Args: [ '/d /s /c', 'gulp watch' ]
12 silly lifecycle ga-dev-tools#~start: Returned: code: 1 signal: null
13 info lifecycle ga-dev-tools#~start: Failed to exec start script
14 verbose stack Error: ga-dev-tools# start: gulp watch
14 verbose stack Exit status 1
14 verbose stack at EventEmitter. (C:\Program Files\nodejs\node_modules\npm\lib\utils\lifecycle.js:279:16)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at EventEmitter.emit (events.js:194:7)
14 verbose stack at ChildProcess. (C:\Program Files\nodejs\node_modules\npm\lib\utils\spawn.js:40:14)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at ChildProcess.emit (events.js:194:7)
14 verbose stack at maybeClose (internal/child_process.js:899:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
15 verbose pkgid ga-dev-tools#
16 verbose cwd c:\GitHub\ga-dev-tools
17 error Windows_NT 6.1.7601
18 error argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "start"
19 error node v7.8.0
20 error npm v4.2.0
21 error code ELIFECYCLE
22 error errno 1
23 error ga-dev-tools# start: gulp watch
23 error Exit status 1
24 error Failed at the ga-dev-tools# start script 'gulp watch'.
24 error Make sure you have the latest version of node.js and npm installed.
24 error If you do, this is most likely a problem with the ga-dev-tools package,
24 error not with npm itself.
24 error Tell the author that this fails on your system:
24 error gulp watch
24 error You can get information on how to open an issue for this project with:
24 error npm bugs ga-dev-tools
24 error Or if that isn't available, you can get their info via:
24 error npm owner ls ga-dev-tools
24 error There is likely additional logging output above.
25 verbose exit [ 1, true ]

Resources