I am new to Derby and just installed it on Ubuntu 12.10.
I have the following installed.
node v0.11.6-pre
Derby 0.5.9
Mongo git master
Redis 2.2.12
I created the starter CoffeeScript application using derby new --coffee testapp. It seems like things installed just fine.
When I try to run the app using npm start I get the following error:
digilord#digidev:~/testapp$ npm start
> testapp#0.0.0 start /home/digilord/testapp
> ./node_modules/coffee-script/bin/coffee server.coffee
Master pid 12985
/home/digilord/testapp/node_modules/coffee-script/lib/coffee-script/optparse.js:51
throw new Error("unrecognized option: " + arg);
^
Error: unrecognized option: --debug-port=5859
at OptionParser.exports.OptionParser.OptionParser.parse (/home/digilord/testapp/node_modules/coffee-script/lib/coffee-script/optparse.js:51:19)
at parseOptions (/home/digilord/testapp/node_modules/coffee-script/lib/coffee-script/command.js:464:29)
at Object.exports.run (/home/digilord/testapp/node_modules/coffee-script/lib/coffee-script/command.js:55:5)
at Object.<anonymous> (/home/digilord/testapp/node_modules/coffee-script/bin/coffee:7:41)
at Module._compile (module.js:450:26)
at Object.Module._extensions..js (module.js:468:10)
at Module.load (module.js:350:32)
at Function.Module._load (module.js:306:12)
at Function.Module.runMain (module.js:491:10)
at startup (node.js:119:16)
at node.js:813:3
digilord#digidev:~/testapp$
Has anyone else run into this?
With some help from TheOceanMethod I was able to get everything working. Thought I was going to stop there huh?
Here's the solution:
Derby 0.5.9
Node v0.10.15
Mongo git master
Redis 2.6.14
Derby 0.5.9 requires Node to be v0.10.15. Not Derby specifically. Some of the dependancies require that version of Node. Redis needs to be v2.6+, so 2.6.14 works.
One other thing. In the server/index file there is a line that references ../../public that is commented out. In order to get the ability to serve images you need to uncomment that line.
Related
Meteor app crashes every two-three minutes with this error:
TypeError: Error.captureStackTrace is not a function
at Error.MongoError (/Users/alex/.meteor/packages/npm-mongo/.1.5.45.1i7w6an++os+web.browser+web.cordova/npm/node_modules/mongodb-core/lib/error.js:13:9)
at Function.MongoError.create (/Users/alex/.meteor/packages/npm-mongo/.1.5.45.1i7w6an++os+web.browser+web.cordova/npm/node_modules/mongodb-core/lib/error.js:29:11)
at Socket.<anonymous> (/Users/alex/.meteor/packages/npm-mongo/.1.5.45.1i7w6an++os+web.browser+web.cordova/npm/node_modules/mongodb-core/lib/connection/connection.js:161:20)
at Socket.g (events.js:260:16)
at emitNone (events.js:67:13)
at Socket.emit (events.js:166:7)
at Socket._onTimeout (net.js:332:8)
at _runOnTimeout (timers.js:524:11)
at _makeTimerTimeout (timers.js:515:3)
at Timer.unrefTimeout (timers.js:584:5)
This started after I updated my project to Meteor 1.4. Is Meteor doing something in the background? How can I debug it to find out what's going on?
Additional details: I'm using React, react-router and reactrouter:react-router-ssr. So there is server side rendering. Maybe this will trigger something...
Guys. The most important detail as I see it is this:
Error.captureStackTrace is not a function
This is a core node function! If I run node and enter Error I see the function: captureStackTrace: [Function: captureStackTrace]. So the issue looks like Meteor is maybe running an older version of node that doesn't have captureStackTrace in Error yet? Well, I followed the instructions here to check the version:
MonsterMac:/ alex$ cd ~/.meteor/packages/meteor-tool/1.4.0-1/mt-os.osx.x86_64/dev_bundle/bin/
MonsterMac:bin alex$ ./node -v
v4.4.7
According to the Change log captureStackTrace is there in version 4.4.7. Now what?
Meteor uses node 4.4.7. Also, with Meteor 1.4, Mongo is updated to a newer version. To resolve this error, try meteor reset. This will refresh Mongo to the latest version, when you start meteor next.
I'm getting the below error when I try to deploy my Keystonejs website. It works when I run it locally. However using digital ocean on: 512 MB Memory / 20 GB Disk / LON1 - Ubuntu node v4.4.0 on 14.04 it gives ...
node keystone.js
{ [Error: ENOENT: no such file or directory, open '.env'] errno: -2, code: 'ENOENT', syscall: 'open', path: '.env' }
module.js:327
throw err;
^
Error: Cannot find module 'unicode/category/So'
at Function.Module._resolveFilename (module.js:325:15)
at Function.Module._load (module.js:276:25)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at symbols (/root/vanillakeystone/node_modules/keystone/node_modules/keystone-utils/node_modules/slug/slug.js:6:16)
at /root/vanillakeystone/node_modules/keystone/node_modules/keystone-utils/node_modules/slug/slug.js:199:5
at Object. (/root/vanillakeystone/node_modules/keystone/node_modules/keystone-utils/node_modules/slug/slug.js:212:2)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
Please help! Thanks in advance.
I too get it some time.
Whenever I get I run this command.
node node_modules/unicode/install.js
Manually go into your node_modules folder and delete the unicode module. Then, go back to your project directory where you're running node keystone.js and type npm install unicode.
Then run your node keystone.js command again.
What I normally do is create a Docker image with my Keystone project, so that I don't have that kind of compatibility issues:
https://v5.keystonejs.com/guides/deployment
I was running MongoDB successfully on an Ubuntu server along with my nodeJS application. But for some reason I get following error in my mongodb-log when I start it with forever start /path/to/mongod:
/mongodb/mongodb-linux-x86_64-3.0.5/bin/mongod:1
(function (exports, require, module, __filename, __dirname) { ^?ELF^B^A^A^
SyntaxError: Unexpected token ILLEGAL
at Module._compile (module.js:439:25)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:902:3
error: Forever detected script exited with code: 8
I removed the mongodb directory and installed it again, but I still get the same error.
Thanks for your help
forever is only meant to node.js-based modules. mongod is a binary (i.e. in ELF format, do file $(which mongod) to verify this for yourself) and cannot be handled by forever.
What you see is forever trying to use node to start a node module called mongoand failing to compile the js code (since it is reading a ELF header).
You will have to rely on your system's init system as for regular daemons. I would start reading here for how to proceed.
I'm trying to run meteor from a checkout following the instructions on the main README: https://github.com/meteor/meteor (under Slow Start.) I'm trying to run the devel branch.
When running normal meteor, it starts up a mongo instance using the database stored in the .meteor directory of the current project. However, the checked out version throws the following error:
W20130729-16:18:46.369(-4)?(STDERR) /home/mao/projects/CrowdMapper/.meteor/local/build/programs/server/boot.js:184
W20130729-16:18:46.370(-4)?(STDERR) }).run();
W20130729-16:18:46.371(-4)?(STDERR) ^
W20130729-16:18:46.393(-4)?(STDERR) Error: MONGO_URL must be set in environment
W20130729-16:18:46.395(-4)?(STDERR) at packages/mongo-livedata/remote_collection_driver.js:32
W20130729-16:18:46.395(-4)?(STDERR) at _.once (packages/underscore/underscore.js:704)
W20130729-16:18:46.396(-4)?(STDERR) at new Meteor.Collection (packages/mongo-livedata/collection.js:65)
W20130729-16:18:46.396(-4)?(STDERR) at packages/service-configuration/service_configuration_common.js:8
W20130729-16:18:46.397(-4)?(STDERR) at packages/service-configuration.js:42:4
W20130729-16:18:46.397(-4)?(STDERR) at packages/service-configuration.js:51:3
W20130729-16:18:46.397(-4)?(STDERR) at mains (/home/mao/projects/CrowdMapper/.meteor/local/build/programs/server/boot.js:153:10)
W20130729-16:18:46.399(-4)?(STDERR) at Array.forEach (native)
W20130729-16:18:46.400(-4)?(STDERR) at Function._.each._.forEach (/home/mao/projects/meteor/dev_bundle/lib/node_modules/underscore/underscore.js:79:11)
W20130729-16:18:46.400(-4)?(STDERR) at /home/mao/projects/CrowdMapper/.meteor/local/build/programs/server/boot.js:80:5
How can I tell this version to use the project-local mongo database and start its own mongo instance as before?
This was caused by a breaking change in the devel branch as documented here:
https://groups.google.com/forum/#!topic/meteor-core/xtTlpFqp4to
This is because Meteor 0.6.5-rc's and later don't automatically include core dependencies that were listed for free before. It can be fixed with
meteor add standard-app-packages
or
meteor run-upgrader app-packages
I've installed derbyjs using npm install -g derby and then created a test app using derby new test.
Then i started the app using node server.js and I got the following output:
info - socket.io started
Starting cluster with 1 workers in undefined mode
`kill -s SIGUSR2 7161` to force cluster reload
Go to: http://localhost:3000/
info - socket.io started
So I tried to request http://localhost:3000/, but the site does not finish loading and I get the following exception:
TEMPLATE ERROR
Error: Model mutation performed after bundling for clientId: 79f4a9f3-25fc-438d-b9f4-a450dccf9566
at Model.errorOnCommit [as _commit] (/web/derby/test/node_modules/derby/node_modules/racer/lib/bundle/bundle.Model.js:64:9)
at /web/derby/test/node_modules/derby/node_modules/racer/lib/txns/txns.Model.js:120:15
at next (/web/derby/test/node_modules/derby/node_modules/racer/lib/middleware.js:7:26)
at /web/derby/test/node_modules/derby/node_modules/racer/lib/txns/txns.Model.js:107:16
at next (/web/derby/test/node_modules/derby/node_modules/racer/lib/middleware.js:7:26)
at /web/derby/test/node_modules/derby/node_modules/racer/lib/txns/txns.Model.js:101:16
at next (/web/derby/test/node_modules/derby/node_modules/racer/lib/middleware.js:7:26)
at /web/derby/test/node_modules/derby/node_modules/racer/lib/txns/txns.Model.js:92:16
at next (/web/derby/test/node_modules/derby/node_modules/racer/lib/middleware.js:7:26)
at Object.run (/web/derby/test/node_modules/derby/node_modules/racer/lib/middleware.js:10:12)
events.js:68
throw arguments[1]; // Unhandled 'error' event
^
Error: Cannot write after end
at Gzip.write (zlib.js:311:31)
at ServerResponse.res.write (/web/derby/test/node_modules/express/node_modules/connect/lib/middleware/compress.js:82:18)
at Object.View._render (/web/derby/test/node_modules/derby/lib/View.server.js:337:9)
at /web/derby/test/node_modules/derby/lib/View.server.js:276:10
at Array.2 (/web/derby/test/node_modules/derby/lib/View.server.js:300:5)
at Object.Promise.resolve (/web/derby/test/node_modules/derby/node_modules/racer/lib/util/Promise.js:21:19)
at /web/derby/test/node_modules/derby/lib/View.server.js:136:17
at /web/derby/test/node_modules/derby/lib/files.js:224:7
at Object.oncomplete (fs.js:308:15)
at process._makeCallback (node.js:248:20)
I have absolutely no idea how I can get it running... Is it a bug, or am I doing something wrong?
Update
I've created a bug report on the derby repository: https://github.com/codeparty/derby/issues/170