try-cb-nodejs's People
Forkers
ingenthr simonleigh corbinu denystyshetskyy dwlf direktspeed-ltd williamouang khoadp ashutoshsharmaindiatry-cb-nodejs's Issues
OAK <-> SFO crashes app
OAK <-> SFO crashes app.
Search for flights from SFO to/from SFO and the app crashes.
QUERY: SELECT faa as fromAirport,geo FROM `travel-sample` WHERE airportname = 'Metropolitan Oakland Intl' UNION SELECT faa as toAirport,geo FROM `travel-sample` WHERE airportname = 'sfo'
/usr/src/app/node_modules/haversine/haversine.js:21
var dLat = toRad(end.latitude - start.latitude)
^
TypeError: Cannot read property 'latitude' of undefined
at haversine (/usr/src/app/node_modules/haversine/haversine.js:21:42)
at /usr/src/app/model/flightPath.js:45:24
at /usr/src/app/model/db.js:209:9
at N1qlQueryResponse.<anonymous> (/usr/src/app/node_modules/couchbase/lib/bucket.js:694:7)
at N1qlQueryResponse.emit (events.js:110:17)
at /usr/src/app/node_modules/couchbase/lib/bucket.js:641:15
ENV
$ git describe --long --dirty --abbrev=10 --tags --always
8d06139abd-dirty
* added git to dockerfile
Problem with autoprovisioning.
Strange behavior of node.js on Windows: having expression (at line 120)
init(function(){});
prevents autoprovisioning process completion as it stack in infinite cycle of creating-checking-dropping of temp index. db.init can't signal of successful result by calling "done" function back.
Commenting this line out solve problem with autoprovisioning but breaks app after restart:
TypeError: Cannot read property 'query' of undefined
So, to make it works back I need to uncomment this line.
Couchbase: 4.0.0-2213 DEV Edition (build-2213)
Node.js: v0.12.2
Windows 7 x64
Cannot login: TypeError: Cannot call method 'get' of undefined
Hi there,
I am following http://developer.couchbase.com/documentation/server/4.1/travel-app/index.html to test CouchBase.
I am getting this error when I try to create a user and login for the first time.
root@CA2DTGD-SRN-06:/opt/try-cb# nodejs app.js
⇒ AUTOPROVISION: INITIATED
COUCHBASE INSTANCE: localhost:8091 LOCATE
COUCHBASE INSTANCE BUCKET: travel-sample CHECK IF PROVISIONED
COUCHBASE INSTANCE: localhost:8091 LOCATED
COUCHBASE INSTANCE BUCKET COUNT: 4 LISTED BELOW
COUCHBASE INSTANCE BUCKET: beer-sample
COUCHBASE INSTANCE BUCKET: default
COUCHBASE INSTANCE BUCKET: gamesim-sample
COUCHBASE INSTANCE BUCKET: travel-sample
COUCHBASE INSTANCE EXISTS: travel-sample PROVISIONED
⇐ AUTOPROVISION: ALREADY PROVISIONED. MOVING ON
LOGIN AT http://localhost:3000
LOADING [====================] 100% 0.0s
TypeError: Cannot call method 'get' of undefined
at CbStoreAdapter.get (/opt/try-cb/node_modules/ottoman/lib/storeadapter.js:142:15)
at Ottoman._findModelsByRefDocIndex (/opt/try-cb/node_modules/ottoman/lib/ottoman.js:334:16)
at Ottoman._findModelByIndex (/opt/try-cb/node_modules/ottoman/lib/ottoman.js:454:10)
at /opt/try-cb/model/auth.js:13:18
at filterScan (/opt/try-cb/model/auth.js:134:5)
at Object.module.exports.createLogin (/opt/try-cb/model/auth.js:11:5)
at /opt/try-cb/routes/routes.js:70:14
at Layer.handle [as handle_request] (/opt/try-cb/node_modules/express/lib/router/layer.js:95:5)
at next (/opt/try-cb/node_modules/express/lib/router/route.js:131:13)
at /opt/try-cb/node_modules/body-parser/lib/read.js:129:5
Do you know what is wrong?
Thank you very much,
Shi
package.json missing a start script
I'm not a nodejs guy, but the docker system is complaining that the try-cb-nodejs is missing a start script in its package.json.
Should show feedback when no flights found.
Should show feedback when no flights found. eg. OAK <-> SFO
ENV
$ git describe --long --dirty --abbrev=10 --tags --always
8d06139abd-dirty
* added git to dockerfile
airport name searches should not be case sensitive
airport name searches should not be case sensitive
Tried 'chic" and no results, but "Chic" works.
This issue is non-obvious and search seems quite broken if you start by entering "san" for example, which populates the auto-suggests list with "San Diego Intl". A stop gap would be to list only 3 letter airport codes in auto-suggest dropdown.
ADDITIONAL DETAILS
"San " only auto-suggests "San Diego". I have not enter "San F" to get suggestion of SFO. This could be treated as a separate issue -- trigger multiple queries.
ENV
$ git describe --long --dirty --abbrev=10 --tags --always
8d06139abd-dirty
* added git to dockerfile
Cannot build. Gettting an error with npm install [email protected]
Looks to be a problem with npm install [email protected]
during build. NOTE: I ran npm install couchbase
on my machine and that worked ok.
../src/couchbase_impl.cc:454:46: warning: 'ToObject' is deprecated [-Wdeprecated-declarations]
Local<Object> metaObj = dataRes->ToObject();
^
/Users/x/.node-gyp/10.13.0/include/node/v8.h:2455:10: note: 'ToObject' has been explicitly marked deprecated here
inline V8_DEPRECATED("Use maybe version", Local<Object> ToObject() const);
^
/Users/x/.node-gyp/10.13.0/include/node/v8config.h:327:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated))
^
11 warnings and 1 error generated.
make: *** [Release/obj.target/couchbase_impl/src/couchbase_impl.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/Users/x/.nvm/versions/node/v10.13.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:240:12)
gyp ERR! System Darwin 18.5.0
gyp ERR! command "/Users/x/.nvm/versions/node/v10.13.0/bin/node" "/Users/x/.nvm/versions/node/v10.13.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/x/Documents/GitHub/try-cb-nodejs-5.0/node_modules/couchbase
gyp ERR! node -v v10.13.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `prebuild-install || node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
12:19 $ ignite doctor
System
platform darwin
arch x64
cpu 8 cores Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz
directory /Users/x/workspace/FAL/falcon-app-automationJavaScript
node 10.13.0 /Users/x/.nvm/versions/node/v10.13.0/bin/node
npm 6.9.0 /Users/x/.nvm/versions/node/v10.13.0/bin/npm
yarn 1.12.3 /usr/local/bin/yarnReact Native
react-native-cli 2.0.1Ignite
ignite 2.2.3 /usr/local/bin/igniteAndroid
java 1.8.0_101 /Users/x/.asdf/shims/java
android home - /Users/x/Library/Android/sdkiOS
xcode 10.0
Future: Try implament the popular debug module
Hello i regonized that your code is havy using console.log i think you should start using npm install --save debug as express and others do.
it allows you to then to pass via ENV what you whant to get logged and what not realy good for debuging indipendent parts of a bigger app and will also save you from doing a costum setting like you did with show log in console or not
the biggest gain from this is better filter able output
Missing yum in docker image
/tmp/try-cb-nodejs-master # docker build -t try-cb-nodejs .
Sending build context to Docker daemon 2.804 MB
Step 0 : FROM couchbase/server:enterprise-4.0.0-rc0
Pulling repository docker.io/couchbase/server
32702aac37b4: Download complete
ba2b457ecfb2: Download complete
26180b0fe8fb: Download complete
edd7c1974a70: Download complete
57bca5139a13: Download complete
a767405442dd: Download complete
aa4a6227d824: Download complete
ffa31afe249c: Download complete
5ef712e689d7: Download complete
27f886d7135a: Download complete
82fa5c79435c: Download complete
bd0b9b3d5a36: Download complete
f95d4fe092e9: Download complete
fe0a2bddc805: Download complete
9ee389776eca: Download complete
f35991feb71d: Download complete
Status: Downloaded newer image for couchbase/server:enterprise-4.0.0-rc0
---> 32702aac37b4
Step 1 : RUN yum -y install gcc-c++
---> Running in 84dace6a5439
/bin/sh: 1: yum: not found
The command '/bin/sh -c yum -y install gcc-c++' returned a non-zero code: 127
docker build gets to init check, which never succeeds
docker build gets to init check, which never succeeds
To work around #7, I added git to the yum list in Dockerfile.
$ docker build -t try-cb-nodejs .
...
Step 10 : RUN /usr/src/app/config.batinc
...
{ init: 'check' }
QUERY: CREATE INDEX temp ON `travel-sample`(non) USING gsi
QUERY: SELECT COUNT(*) FROM system:indexes WHERE state="online"
INDEXES ONLINE: [ { '$1': 8 } ]
0 0 0 0 0 0 0 0 --:--:-- 0:00:27 --:--:-- 0CHECKING IF INDEX SERVICE READY:ATTEMPT 35
WORKAROUND
Eventually the bat test fails and the build completes:
{ init: 'check' }
QUERY: CREATE INDEX temp ON `travel-sample`(non) USING gsi
QUERY: SELECT COUNT(*) FROM system:indexes WHERE state="online"
INDEXES ONLINE: [ { '$1': 8 } ]
Stopping couchbase-server
[ OK ]
/usr/src/app/config.batinc: line 33: 2439 Terminated node app.js
couchbase-server finished running
---> fe66578c2ad1
Removing intermediate container d294c354baf1
Step 11 : EXPOSE 3000 8091 8092 8093 11210 11211
---> Running in 78a5b359ecdf
---> 13692f2835f5
Removing intermediate container 78a5b359ecdf
Step 12 : ENTRYPOINT /bin/bash -c
---> Running in 2c63dc9883bc
---> 99b1c7e895ff
Removing intermediate container 2c63dc9883bc
Step 13 : CMD /usr/src/app/app.cmd
---> Running in 7aec32f8b0f9
---> 252bbb84101a
Removing intermediate container 7aec32f8b0f9
Successfully built 252bbb84101a
ENV
Mac OS X 10.9
$ boot2docker -v
Boot2Docker-cli version: v1.7.0
Git commit: 7d89508
$ docker -v
Docker version 1.7.0, build 0baf609
hello,question about angular source code
thx for your node.js demo. the demo include angular compile code,where can I download the source code?
docker build fails: git not found
build fails: git not found
$ docker build -t try-cb-nodejs .
Sending build context to Docker daemon 5.433 MB
Sending build context to Docker daemon
Step 0 : FROM couchbase/server:enterprise-4.0.0-dp
---> cddf829eb26a
Step 1 : RUN yum -y install gcc-c++
---> Using cache
---> 9163a4325c0e
Step 2 : RUN gpg --keyserver pool.sks-keyservers.net --recv-keys 7937DFD2AB06298B2293C3187D33FF9D0246406D 114F43EE0176B71C7BC219DD50A3051F888C628D
---> Using cache
---> 17949afdf1c5
Step 3 : ENV NODE_VERSION 0.12.2
---> Using cache
---> e33190953f72
Step 4 : ENV NPM_VERSION 2.9.1
---> Using cache
---> d504859a25bf
Step 5 : RUN curl -SLO "http://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-x64.tar.gz" && curl -SLO "http://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc" && gpg --verify SHASUMS256.txt.asc && grep " node-v$NODE_VERSION-linux-x64.tar.gz\$" SHASUMS256.txt.asc | sha256sum -c - && tar -xzf "node-v$NODE_VERSION-linux-x64.tar.gz" -C /usr/local --strip-components=1 && rm "node-v$NODE_VERSION-linux-x64.tar.gz" SHASUMS256.txt.asc && npm install -g npm@"$NPM_VERSION" && npm cache clear
---> Using cache
---> 3a0130efc417
Step 6 : RUN mkdir -p /usr/src/app
---> Using cache
---> 9317639303d6
Step 7 : WORKDIR /usr/src/app
---> Using cache
---> 53d64700e003
Step 8 : COPY . /usr/src/app
---> Using cache
---> d15f852625f4
Step 9 : RUN npm install
---> Running in 8d1603acd83c
npm ERR! git clone --template=/root/.npm/_git-remotes/_templates --mirror https://github.com/couchbaselabs/node-ottoman.git /root/.npm/_git-remotes/https-github-com-couchbaselabs-node-ottoman-git-e8084cb5: undefined
npm ERR! git clone --template=/root/.npm/_git-remotes/_templates --mirror https://github.com/couchbaselabs/node-ottoman.git /root/.npm/_git-remotes/https-github-com-couchbaselabs-node-ottoman-git-e8084cb5: undefined
npm ERR! Linux 4.0.5-boot2docker
npm ERR! argv "node" "/usr/local/bin/npm" "install"
npm ERR! node v0.12.2
npm ERR! npm v2.9.1
npm ERR! code ENOGIT
npm ERR! not found: git
npm ERR!
npm ERR! Failed using git.
npm ERR! This is most likely not a problem with npm itself.
npm ERR! Please check if you have git installed and in your PATH.
npm ERR! Please include the following file with any support request:
npm ERR! /usr/src/app/npm-debug.log
The command '/bin/sh -c npm install' returned a non-zero code: 1
$ docker inspect d504859a25bf | grep PACK
"CB_PACKAGE=couchbase-server-enterprise-4.0.0-dp-centos7.x86_64.rpm",
Couchbase module version does not match Ottomans
I am getting an error when cloning this project and trying to run it according to https://www.couchbase.com/get-started-developing-nosql or according to the instructions in the docs on in this project.
The error is: The couchbase module version used by the application does not match Ottomans. Please explicitly pass the application couchbase module using 'StoreAdapter.Couchbase'.
I have tried installing the couchbase version 2.2.5 and still not luck.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.