Error when creating Cube.js API - Failure at cubestore - node.js

I'm working with Cube.js as part of an effort to create a database with front-end visualization. I'm new to the whole system, and am attempting to follow a tutorial posted here:
https://d3-dashboard.cube.dev/setting-up-a-database-and-cube-js
I have the Postgres database established, but when I go to scaffold the project with:
npx cubejs-cli create d3-dashboard -d postgres
I am receiving an error (below), which seems to be associated with #cubejs-backend\cubestore.
I'm not sure if this is associated with my setup of Node.js. I installed version 14.16.1 and later through some other troubleshooting upgraded npm to version 7.9.0.
Here's the error I'm seeing - any help greatly appreciated:
found 0 vulnerabilities
- Writing files from template
- Installing Cube Store driver
npm ERR! code 1
npm ERR! path C:\Program Files\nodejs\node_modules\d3-dashboard\node_modules\#cubejs-backend\cubestore
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c ./bin/post-install
npm ERR! '.' is not recognized as an internal or external command,
npm ERR! operable program or batch file.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\allenc\AppData\Local\npm-cache\_logs\2021-04-09T16_17_36_455Z-debug.log
Cube.js Error ---------------------------------------
Error: npm install --save-dev #cubejs-backend/cubestore-driver failed with exit code 1
at ChildProcess.<anonymous> (C:\Users\allenc\AppData\Local\npm-cache\_npx\b15e41626979eec6\node_modules\cubejs-cli\src\utils.ts:14:16)
at ChildProcess.emit (events.js:315:20)
at ChildProcess.cp.emit (C:\Users\allenc\AppData\Local\npm-cache\_npx\b15e41626979eec6\node_modules\cross-spawn\lib\enoent.js:34:29)
at maybeClose (internal/child_process.js:1048:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)

It's was an issue, which was already fixed. Can you try with latest releases?
Thanks

Related

npm building issues for SyntaxHighlighter

I'm a beginner with npm and is trying to build SyntaxHighlighter version 4 by cloning it using git first, but failed. Here are the errors I got:
1 error generated.
make: *** [Release/obj.target/binding/src/create_string.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/Users/name/syntaxhighlighter/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:311:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Darwin 19.3.0
gyp ERR! command "/usr/local/bin/node" "/Users/name/syntaxhighlighter/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /Users/name/syntaxhighlighter/node_modules/node-sass
gyp ERR! node -v v12.16.1
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
Build failed with error code: 1
npm WARN notsup Unsupported engine for karma#0.13.22: wanted: {"node":"0.10 || 0.12 || 4 || 5"} (current: {"node":"12.16.1","npm":"6.13.4"})
npm WARN notsup Not compatible with your version of node/npm: karma#0.13.22
npm WARN syntaxhighlighter#4.0.1 No description
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass#3.13.1 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass#3.13.1 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/name/.npm/_logs/2020-04-05T02_52_17_048Z-debug.log
The problem you are running into is that SyntaxHighlighter version 4 is too old and its dependencies are not supported by the version of Node you are running.
The package that the error is coming from is Karma. The version of Karma that is trying to install is v0.13.22. That version of Karma only supported a maximum Node version of 5, and you appear to be running version 12.
You could potentially solve this issue by downgrading your Node version, or using a tool like Node Version Manager (NVM) to temporarily downgrade your Node version.
NVM
Try to install node_modules only.
cd /syntaxhighlighter/node_modules$ and then try installing using npm install.
There are some errors in gulp.js file that are causing problems in the installation process. I have tried older versions but none of them is available. Hope this will work out.
robdonn's NVM solution works, however, I had a very unusual instance when running multiple versions of Node, managed through NVM, was breaking my ApiConnect/Loopback client (only on a Mac). I never figured out why but realize that running a single version of Node fixed the problem.
Also wanting to use syntaxhighlighter, I did manage to generate the syntaxhighlighter.js file using a Docker container. In the cloned directory I added the Dockerfile.
FROM node:5
# Create app directory
WORKDIR /usr/src/app
# Install app dependencies
# A wildcard is used to ensure both package.json AND package-lock.json are copied
# where available (npm#5+)
COPY package*.json ./
RUN npm install
# Bundle app source
COPY . .
Thereafter I was able to:
Build a local docker container
docker build -t syntaxhighlighter .
Run the container mapping my local dist directory to the container's dist directory
docker run -i --volume ~/github/syntaxhighlighter/dist:/usr/src/app/dist syntaxhighlighter
Got the container id for the local running container
docker ps
Used the container id to go into the container (could have also just put CMD ['/bin/sh'] in my Dockerfile)
docker exec -it <the-container-id> /bin/sh
Ran the gulp build from the Node v5 container. Since I am mapping my local dist directory to the container's dist directory, I get the output locally.
./node_modules/gulp/bin/gulp.js build --brushes=all --compat

Unable to verify the first certificate (grpc/node)

For some background, I am following along with this tutorial, trying to get the node example working.
I have downloaded the folder, cd'd into the directory, and tried to run npm install.
I get the following stack trace.
npm WARN package.json grpc-examples#0.1.0 No repository field.
npm WARN package.json grpc-examples#0.1.0 No license field.
\
> grpc#1.12.2 install /tmp/grpc/examples/node/node_modules/grpc
> node-pre-gyp install --fallback-to-build --library=static_library
node-pre-gyp WARN Tried to download(400): https://storage.googleapis.com/grpc-precompiled-binaries/node/grpc/v1.12.2/node-v46-linux-x64-glibc.tar.gz
node-pre-gyp WARN Pre-built binaries not found for grpc#1.12.2 and node#4.5.0 (node-v46 ABI, glibc) (falling back to source compile with node-gyp)
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: unable to verify the first certificate
gyp ERR! stack at Error (native)
gyp ERR! stack at TLSSocket.<anonymous> (_tls_wrap.js:1022:38)
gyp ERR! stack at emitNone (events.js:67:13)
gyp ERR! stack at TLSSocket.emit (events.js:166:7)
gyp ERR! stack at TLSSocket._init.ssl.onclienthello.ssl.oncertcb.TLSSocket._finishInit (_tls_wrap.js:586:8)
gyp ERR! stack at TLSWrap.ssl.onclienthello.ssl.oncertcb.ssl.onnewsession.ssl.onhandshakedone (_tls_wrap.js:428:38)
gyp ERR! System Linux 4.8.13-100.fc23.x86_64
gyp ERR! command "/home/nbkiq0w/.nvm/versions/node/v4.5.0/bin/node" "/home/nbkiq0w/.nvm/versions/node/v4.5.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--libr$ry=static_library" "--module=/tmp/grpc/examples/node/node_modules/grpc/src/node/extension_binary/node-v46-linux-x64-glibc/grpc_node.node" "--module_name=grpc_node" "--module_path=/tmp/grpc/examples/node/node_mo$ules/grpc/src/node/extension_binary/node-v46-linux-x64-glibc" "--node_abi_napi=node-v46"
There's a bit more to the stack trace, but I think this gets the gist of it.
Unable to verify the first certificate
seems relevant here.
I googled a bit and found this, which seems to address my issue. I modified the example source code,
examples/node/dynamic_codegen/greeter_server.js
So it now has the following added to the top of the existing file.
var rootCas = require('ssl-root-cas/latest').create();
rootCas
.addFile('/etc/pki/ca-trust/source/anchors/amrs-g2.cer');
require('https').globalAgent.options.ca = rootCas;
In an attempt to follow this pattern. I am still seeing the same issue.
Anyone have any ideas? I should mention that I am running node version 4.5.0 and npm version 2.15.9.
I've tried messing around with the versions a bit, but can't get it working.
edit 1:
Tried updating node version to 10.0.0
Npm version 5.6.0
Tried the npm install again, this time got a weird error...
npm install
npm ERR! code E418
npm ERR! 418 I'm a teapot: async#^1.5.2
edit 2:
Tried running the command over and over, seems like the library it fails on is more or less random.
npm ERR! code E418
npm ERR! 418 I'm a teapot: grpc#^1.0.0
^C
[nbkiq0w#localhost node]$ npm install
npm ERR! code E418
npm ERR! 418 I'm a teapot: google-protobuf#^3.0.0
^C
[nbkiq0w#localhost node]$ npm install
npm ERR! code E418
npm ERR! 418 I'm a teapot: lodash#^4.6.1
^C
[nbkiq0w#localhost node]$ npm install
npm ERR! code E418
npm ERR! 418 I'm a teapot: grpc#^1.0.0
^C
[nbkiq0w#localhost node]$ npm install
npm ERR! code E418
npm ERR! 418 I'm a teapot: lodash#^4.6.1
Seems like it just fails regardless of library, I tried updating my proxy settings like seen here. Doesn't seem to help.
edit 3:
switched back to node 6.12.0, and seeing the original tls error. One of my friends was able to download the node directory as is, and run on his machine (using 6.12.0), so it must be something isolated to my machine.
I found on another page some advice to adjust my .npmrc file found in my home directory. I added the following line
cafile=<my cert file>
And the npm install worked. I'm unsure why my friend's install worked, since he didn't even have this file, but this is good enough for the time being.

docpad run error undefined .docpad.cson

So, I've been playing around with DocPad lately; I've run through the tutorial and have everything installed and working properly, except...
In the interest of seeing how DocPad works with a larger site, I grabbed the code for Jason Young's (http://ytechie.com) site from github (why this site? It's where I first heard about DocPad is all). Per the instructions, I executed npm install (no problems yet); then docpad run. It returns with this error:
C:\Users\harnerd\Documents\GitHub\ytechie-docpad>docpad run
error: undefined 'C:\\Users\\harnerd\\.docpad.cson'
error: null
error: null
TypeError: undefined is not a function
at Object.exports.eval (C:\Users\harnerd\Documents\GitHub\ytechie- docpad\node_modules\coffee-script\lib\coffee-script\coffee-script.js:120:47)
at Object.CSON.parseSync (C:\Users\harnerd\Documents\GitHub\ytechie-docpad\node_modules\docpad\node_modules\cson\out\lib\cson.js:90:34)
at null._onTimeout (C:\Users\harnerd\Documents\GitHub\ytechie-docpad\node_modules\docpad\node_modules\cson\out\lib\cson.js:70:24)
at Timer.listOnTimeout (timers.js:119:15)
info: null
Given that I'm new to DocPad, there's probably something simple and obvious that I'm missing, but I've no idea what. I must admit that DocPad is a bit inscrutable when something goes wrong. It seems to me that it's complaining that it can't find the .docpad.cson file, but it definitely does exist in the location referenced in the error message.
Am I totally misinterpreting the meaning of this error, or what? I'm running node.js v0.12.7 and docpad v6.54.2 on Windows 7.
Edit: Here are the contents of my .docpad.cson file:
name: "MAC 6a85329428c35b394e921ec0cb3298eed2a1b707"
email: null
username: "6a85329428c35b394e921ec0cb3298eed2a1b707"
subscribed: false
subscribeTryAgain: null
tos: true
identified: true
Nothing magical here. At balupton's suggestion, I ran it through the coffeescript "Try CoffeeScript" compiler, but unsurprisingly it simply generated some JSON.
Edit 2: Trying Benjamin's suggestion in his comment, I ran npm install -g docpad, which ran successfully. I then ran docpad update --global inside the project and was rewarded with this:
C:\Users\harnerd\Documents\GitHub\ytechie-docpad>docpad update --global
info: Welcome to DocPad v6.78.3 (global installation: C:\Users\harnerd\AppData\Roaming\npm\node_modules\docpad)
notice: If everyone who saw this message donated $1/week, maintaining DocPad would become sustainable: http://docpad.org/donate
info: Contribute: http://docpad.org/docs/contribute
info: Plugins: cleanurls, coffeescript, dateurls, eco, less, livereload, marked, paged, partials, sitemap, tagging
info: Environment: development
info: Cleaning files
info: Cleaned files
\
> typechecker#2.0.8 preinstall C:\Users\harnerd\Documents\GitHub\ytechie- docpad\node_modules\docpad-plugin- sitemap\node_modules\extendr\node_modules\typechecker
> node ./cyclic.js
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files (x86)\\nodejs\\\\node.exe" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "docpad#6" "docpad-p
lugin-marked#2" "docpad-plugin-eco#2" "docpad-plugin-less#2" "docpad-plugin- partials#2" "docpad-plugin-coffeescript#2" "docpad-plugin-sitemap#2" "--save"
npm ERR! node v0.12.7
npm ERR! npm v2.11.3
npm ERR! path C:\Users\harnerd\Documents\GitHub\ytechie- docpad\node_modules\docpad-plugin-partials
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! Error: EPERM, lstat 'C:\Users\harnerd\Documents\GitHub\ytechie- docpad\node_modules\docpad-plugin-partials'
npm ERR! at Error (native)
npm ERR! { [Error: EPERM, lstat 'C:\Users\harnerd\Documents\GitHub\ytechie- docpad\node_modules\docpad-plugin-partials']
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! path: 'C:\\Users\\harnerd\\Documents\\GitHub\\ytechie- docpad\\node_modules\\docpad-plugin-partials' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\harnerd\Documents\GitHub\ytechie-docpad\npm-debug.log
error: The action completed successfully
error: An error occured:
Error: Command exited with a non-zero status code.
at Object.safeps.prepareExecutableResult (C:\Users\harnerd\AppData\Roaming\npm\node_modules\docpad\node_modules\safeps\ou t\lib\safeps.js:190:24)
at ChildProcess.<anonymous> (C:\Users\harnerd\AppData\Roaming\npm\node_modules\docpad\node_modules\safeps\ou t\lib\safeps.js:322:29)
at ChildProcess.emit (events.js:110:17)
at maybeClose (child_process.js:1015:16)
at Process.ChildProcess._handle.onexit (child_process.js:1087:5)
To report the above, follow the guide at: http://docpad.org/bug-report
Error: Command exited with a non-zero status code.
at Object.safeps.prepareExecutableResult (C:\Users\harnerd\AppData\Roaming\npm\node_modules\docpad\node_modules\safeps\ou t\lib\safeps.js:190:24)
at ChildProcess.<anonymous> (C:\Users\harnerd\AppData\Roaming\npm\node_modules\docpad\node_modules\safeps\ou t\lib\safeps.js:322:29)
at ChildProcess.emit (events.js:110:17)
at maybeClose (child_process.js:1015:16)
at Process.ChildProcess._handle.onexit (child_process.js:1087:5)
C:\Users\harnerd\Documents\GitHub\ytechie-docpad>
Despite npm's claim, I was running as administrator; however the real problem was not that npm didn't have permission to the docpad-plugin-partials folder - it simply couldn't find it as it had been deleted.
When I originally ran npm install on the project, all the dependencies listed in package.json were created in the node_modules folder, but then when I ran docpad update --global the docpad-plugin-partials folder was removed.
To see if I could repeat this behavior, I grabbed the original code for the site two more times. Each time I ran npm install (no problems - all the dependencies have their own folders in node_modules), then docpad run (got the same problem with the .docpad.cson file), and then finally docpad update --global. Dependency folders were removed from the node_modules folder, but never the same ones.
Edit 3: The saga continues. Despite absolutely nothing having changed, the odd problem with files going missing and staying missing when executing docpad update --global is gone and I'm back to the original problem (error: undefined 'C:\\Users\\harnerd\\.docpad.cson). Don't know if something in my local environment is borked or if there's something wrong in the body of code I grabbed. I doubt it's the latter.
It seems that there was an issue parsing that file, as the undefined is not a function occurred within an eval statement of CSON. Unfortunately, it seems this error occurred before the locale file was loaded, which would explain the lack of good information in the log, which would be a seperate bug (filed report here).
Are there any function calls inside C:\\Users\\harnerd\\.docpad.cson or perhaps some incorrect formatting that CoffeeScript would interpret as a function? Perhaps running it through the http://coffeescript.org "Try CoffeeScript" compiler to check would be helpful? Otherwise, as that file may have sensitive tokens in it, could you email it to support#docpad.org and I'll take a look.

npm install: 'bower install' exited with error code 1

I want to programm widgets for XBee ZigBee Cloud Kit.
To do it, I need first to set up everything.
I'm using this guide.
After failing repeatedly the automated setup I started the Manual setup. I did install the Requirements. So everything so far went good until the last point: npm install. I'm getting the following error bower install' exited with error code 1. I'm not sure what to do, I'm not used to PowerShell or any other shell.
After failing the installing I get this errors:
bower justgauge#* ECMDERR Failed to
execute "git ls-remote --tags --heads git://github.c
om/oscarcv/justgage.git", exit code of #128 fatal: remote error:
Repository not found.
Additional error details: fatal: remote error: Repository
not found.
'bower install' exited with error code 1
npm ERR! Windows_NT 6.1.7601 npm ERR! argv "C:\Program Files\nodejs\\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "i nstall"
npm ERR! node v0.12.4
npm ERR! npm v2.10.1
npm ERR! code ELIFECYCLE
npm ERR! xbee-zigbee-cloud-kit#1.0.0 postinstall: node postinstall.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the xbee-zigbee-cloud-kit#1.0.0 postinstall script 'node postinstall.js'.
npm ERR! This is most likely a problem with the xbee-zigbee-cloud-kit package,
npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system:
npm ERR! node postinstall.js npm ERR!
You can get their info via:
npm ERR! npm owner ls xbee-zigbee-cloud-kit
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\steim\Desktop\XBeeZigBeeCloudKit-master\npm-debug.log
"This is most likely a problem with the xbee-zigbee-cloud-kit package"
If this is true, in that case I don't know what to do, because I work with this package.
This is the npm-debug.log. (Sorry I can't post the whole log, too many characters).
I'm using a company laptop:
Latitude D820
Windows 7 32 Bit
Windows PowerShell with Administration
I'm grateful for any kind of help. I'm getting headache trying to figure it out.
I could solve it. And can now run the app now localy.
I did this steps to solve the issue:
Deleting justgage in bower.json file.
Using commandline: bower install justgage-official
Using commandline: bower update
The only problem is actually I can't start with foreman start (but it's another issue), instead I use python manage.py runserver 0.0.0.0:5000. After that in browser: http://localhost:5000
Thanks Etan Reisner for the hint and thanks Oscar Costoya for guiding me.

Error when installing log.io using npm

I am trying to install log.io following the instruction from https://github.com/NarrativeScience/Log.io. It suggests using npm install command.
npm install -g log.io
The error I am getting is like below. And I tried on both Mac OS and Ubuntu, both no luck. Can anyone help me?
> contextify#0.1.13 install /usr/local/lib/node_modules/log.io/node_modules/jquery/node_modules/contextify
> node-gyp rebuild
npm http GET https://registry.npmjs.org/cssstyle
npm http GET https://registry.npmjs.org/cssom
npm http 304 https://registry.npmjs.org/cssom
npm http 304 https://registry.npmjs.org/cssstyle
gyp: Call to 'node -e "require('nan')"' returned exit status 1. while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/share/node-gyp/lib/configure.js:431:16)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:797:12)
gyp ERR! System Linux 3.13.0-32-generic
gyp ERR! command "nodejs" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/log.io/node_modules/jquery/node_modules/contextify
gyp ERR! node -v v0.10.25
gyp ERR! node-gyp -v v0.10.10
gyp ERR! not ok
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian
npm ERR! Error: ENOENT, chown '/usr/local/lib/node_modules/log.io/node_modules/jquery/node_modules/jsdom/node_modules/request/README.md'
npm ERR! If you need help, you may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-#googlegroups.com>
...
Finally I found the problems.
Ubuntu
On Ubuntu 14.04, the default repository of apt-get for node is not nodejs itself, but ax25-node. This will generate a default command node in /usr/sbin/ and does nothing if you call node (which is called by npm during the installation). I removed this package and created a symlink between node and nodejs, finally solved the problem.
sudo apt-get autoremove node
sudo ln -s /usr/bin/nodejs /usr/bin/node
sudo npm install -g log.io
Mac OS
The error log is quite different from what I got from Ubuntu. After some googling about node-gyp installation failure, I found this issue, which led me to install the Xcode dev tools. Not sure why this happens but it seems there are some conflicts between homebrew and Xcode. Anyway, it finally works :-)
This looks like a race condition in an older version of npm. There have been a lot of improvements to npm -- especially around conflicts and race conditions during install -- since 1.4. Can you try updating your npm installation?
To update npm on Windows, follow the instructions here: https://github.com/npm/npm/wiki/Troubleshooting#upgrading-on-windows
If you still see the problem after updating npm, could you please upload your npm-debug.log as a gist http://gist.github.com? If possible, run npm with at least one -d flag to increase the logging level.
Thanks!
i create this install package...
http://tinyurl.com/kfnfng6
1 - download it
2 - untar it (tar -xvf install_log.io.tar)
3 - cd install_log.io
4 - sh install.sh
5 - enjoy!
This form is simple and quiet.. i hope help other users... What i do? simple.. download packages and dependencies , and put all in one package and create a script...
;)

Resources