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
warn preInstall No description field
warn preInstall No repository field
warn preInstall No license field
┌ [1/3] 🔍 Resolving dependencies
└ Completed in 5.328s
┌ [2/3] 🚚 Fetching dependencies
└ Completed in 0.356s
┌ [3/3] 🔗 Linking dependencies
└ Completed in 0.357s
info security We found `install` scripts which turbo skips for
security reasons. For more information see
https://turbo.sh/install-scripts.
└─ [email protected]
success Saved lockfile "package-lock.json"
success Updated "package.json"
success Install finished in 6.119s
var PouchDB = require('pouchdb');
var express = require('express');
var app = express();
app.use('/db', require('express-pouchdb')(PouchDB));
app.listen(3000);
run using node index.js yields error:
TypeError: Cannot read property 'arm_version' of undefined
at Object.eval (/projects/node-kx3sgx/node_modules/node-gyp-build/index.js:14:90)
at Object.function (https://node-kx3sgx.jw.staticblitz.com/blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:11:19819)
at Module._compile (https://node-kx3sgx.jw.staticblitz.com/blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:6:187549)
at Object.Module._extensions..js (https://node-kx3sgx.jw.staticblitz.com/blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:6:187908)
at Module.load (https://node-kx3sgx.jw.staticblitz.com/blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:6:185988)
at Function.Module._load (https://node-kx3sgx.jw.staticblitz.com/blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:6:183564)
at Module.require (https://node-kx3sgx.jw.staticblitz.com/blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:6:186304)
at i (https://node-kx3sgx.jw.staticblitz.com/blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:6:484674)
at _0x1e5cfd (https://node-kx3sgx.jw.staticblitz.com/blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:11:19724)
at Object.eval (/projects/node-kx3sgx/node_modules/leveldown/binding.js:1:79)
Expected behavior
A clear and concise description of what you expected to happen.
Able to install pouchdb-server
Able to run example index.js
Version of webcontainer
Hash: 7286dbe8d47d3473cde7be488b7d048fb59b05f2
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Browser name = Chrome
Full version = 90.0.4430.212
Major version = 90
navigator.appName = Netscape
navigator.userAgent = Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36
performance.memory = {
totalJSHeapSize: 51211101,
usedJSHeapSize: 47415453,
jsHeapSizeLimit: 2172649472
}
Additional context
Not sure what storage type is available in the stackblitz webcontainer. Using one of the other adapters from https://pouchdb.com/adapters.html may work, instead of the node version which using leveldown storage.
Does stackblitz web container require a web assembly? leveldown is not available as a web assembly as far as I know Level/community#63
The text was updated successfully, but these errors were encountered:
algorist-mechanism
changed the title
BUG:
BUG: nstallation and running pouchdb-server error (leveldown and pouchdb node errors)
May 22, 2021
algorist-mechanism
changed the title
BUG: nstallation and running pouchdb-server error (leveldown and pouchdb node errors)
BUG: installation and running node based pouchdb-server fails (leveldown and pouchdb node errors)
May 22, 2021
It seems like it's trying to compile a native addon using node-gyp-build. Since on stackblitz everything is running in the browser's context, this will not work. Using native addons cannot be supported and need a wasm based replacement.
I'm not sure what native module it is actually trying to run. We do have an initiative to port over existing native addons to wasm and replace them at install time using our own npm client.
It's trying to install leveldown. (npm https://www.npmjs.com/package/leveldown and repo https://github.com/Level/leveldown)
It tries to install a prebuilt version first based on the platform, then run node-gyp-build to build locally if it cannot find a prebuilt.
There's a work around for pouchdb-server (It can use indexedDB, webSQL with sqlite3, localStorage, or in memory). The default is leveldown however. I wanted to see if it would work and document it for others if it didn't.
name: Installation and running pouchdb-server error
about:
title: ''
labels: 'leveldown', "pouchdb"
assignees: ''
Describe the bug
Unable to install and run node based pouchdb-server. https://github.com/pouchdb/pouchdb-server
Link to the blitz that caused the error
https://stackblitz.com/edit/node-kx3sgx
To Reproduce
Steps to reproduce the behavior:
Follow steps from https://github.com/pouchdb/pouchdb-server#usage-1.
npm install express-pouchdb pouchdb express
yields
node index.js
yields error:Expected behavior
A clear and concise description of what you expected to happen.
Version of webcontainer
Hash: 7286dbe8d47d3473cde7be488b7d048fb59b05f2
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Browser name = Chrome
Full version = 90.0.4430.212
Major version = 90
navigator.appName = Netscape
navigator.userAgent = Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36
performance.memory = {
totalJSHeapSize: 51211101,
usedJSHeapSize: 47415453,
jsHeapSizeLimit: 2172649472
}
Additional context
Not sure what storage type is available in the stackblitz webcontainer. Using one of the other adapters from https://pouchdb.com/adapters.html may work, instead of the node version which using leveldown storage.
Does stackblitz web container require a web assembly? leveldown is not available as a web assembly as far as I know Level/community#63
The text was updated successfully, but these errors were encountered: