$ node server.js
node.js:134
throw e; // process.nextTick error, or 'error' event on first tick
^
TypeError: Object #<Object> has no method 'bodyDecoder'
at HTTPServer.<anonymous> (/home/jrg/Realtime-Demo/settings.js:20:18)
at HTTPServer.configure (/home/jrg/Realtime-Demo/node_modules/express/lib/http.js:543:61)
at Object.<anonymous> (/home/jrg/Realtime-Demo/settings.js:18:5)
at Module._compile (module.js:402:26)
at Object..js (module.js:408:10)
at Module.load (module.js:334:31)
at Function._load (module.js:293:12)
at require (module.js:346:19)
at Object.<anonymous> (/home/jrg/Realtime-Demo/server.js:9:13)
at Module._compile (module.js:402:26)
When I try and run the Instagram node.js Realtime Demo project. The server is Ubuntu 10.04 (if that makes a difference, which I doubt).
This is not a duplicate of Express framework giving a very strange error - I tried the instructions there and they didn't work.
connect and express has bodyParser middleware, but not bodyDecoder.
It was renamed in the 1.0.0 version of the connect. It's a reason, why node.js projects must have package.json descriptor with dependences section, where components versions may be fixed.
You can install 0.5.10 version of connect or try to replace bodyDecoder with bodyParser
Related
I recently installed cloudinary via npm and cannot import it in my nodeJS backend due to the following error.
(base) feiwu#Feis-MacBook-Pro backend % node server.js
/Users/feiwu/projects/inventaire/backend/node_modules/cloudinary-core/cloudinary-core.js:1168
var useAgent = navigator && navigator.userAgent || '';
^
ReferenceError: navigator is not defined
at Module../src/namespace/cloudinary-core.js (/Users/feiwu/projects/inventaire/backend/node_modules/cloudinary-core/cloudinary-core.js:1168:16)
at __webpack_require__ (/Users/feiwu/projects/inventaire/backend/node_modules/cloudinary-core/cloudinary-core.js:37:30)
at /Users/feiwu/projects/inventaire/backend/node_modules/cloudinary-core/cloudinary-core.js:101:18
at /Users/feiwu/projects/inventaire/backend/node_modules/cloudinary-core/cloudinary-core.js:104:10
at webpackUniversalModuleDefinition (/Users/feiwu/projects/inventaire/backend/node_modules/cloudinary-core/cloudinary-core.js:10:20)
at Object.<anonymous> (/Users/feiwu/projects/inventaire/backend/node_modules/cloudinary-core/cloudinary-core.js:17:3)
at Module._compile (internal/modules/cjs/loader.js:999:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Module.require (internal/modules/cjs/loader.js:887:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object.<anonymous> (/Users/feiwu/projects/inventaire/backend/node_modules/cloudinary/lib/utils/index.js:48:57)
at Module._compile (internal/modules/cjs/loader.js:999:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
I have found nothing so far about this error and would like to know if someone know about this issue ?
This error is from cloudinary's end. Fix this error with npm i cloudinary-core.
Started happening to me around 15 hours ago as well.
Cloudinary had just released a new version to its JS SDK (version 2.12.2) that fixes this issue.
installing cloudinary-core helped me get rid of this error
npm i cloudinary-core
This issue was introduced recently in Cloudinary version 1.28.0.
https://www.npmjs.com/package/cloudinary/v/1.28.0
The issue reported on github here : https://github.com/cloudinary/cloudinary_npm/issues/524
I was able to fix this issue by pointing cloudinary to 1.27.1
"cloudinary": "1.27.1"
Cloudinary guys have fixed this issue here : https://github.com/cloudinary/cloudinary_js/pull/281.
Very new to Db and JS and trying to learn ExpressJS, RethinkDb using a tutorial from this link.
https://github.com/rethinkdb/rethinkdb-example-nodejs-chat
I followed the instructions and hitting an error in basic module loading I suppose. Looks like some dependency problem or I'm probably missing some step.
As specified in the instruction, I have successfully setup rethinkDb and can see the DB explorer in
http://localhost:8080
But when node app is executed as specified in instructions, I"m hitting an error below. Any help in this regard please?
/Users/test/rethinkdb-example-nodejs-chat/node_modules/socket.io/lib/store.js:35
Store.prototype.__proto__ = EventEmitter.prototype;
^
TypeError: Cannot read property 'prototype' of undefined
at Object.<anonymous> (/Users/test/rethinkdb-example-nodejs-chat/node_modules/socket.io/lib/store.js:35:42)
at Module._compile (module.js:643:30)
at Object.Module._extensions..js (module.js:654:10)
at Module.load (module.js:556:32)
at tryModuleLoad (module.js:499:12)
at Function.Module._load (module.js:491:3)
at Module.require (module.js:587:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/Users/test/rethinkdb-example-nodejs-chat/node_modules/socket.io/lib/manager.js:16:13)
at Module._compile (module.js:643:30)
process.EventEmitter was deprecated and not working in new node version. This has been answered here
Can you rollback to older node.js version and see if you could run the tutorial
https://github.com/LearnBoost/websocket.io/issues/55
when I execute this command,it is right--
coffee -v
it's output is right.`CoffeeScript version 1.6.1
but when I type
$ coffee
it got error,the log is below
node.js:201
throw e; // process.nextTick error, or 'error' event on first tick
^
TypeError: Object #<Object> has no method 'split'
at Interface.setPrompt (readline.js:121:24)
at new REPLServer (repl.js:128:7)
at Object.start (repl.js:249:14)
at Object.start (/usr/local/lib/node_modules/coffee-script/lib/coffee-script/repl.js:95:23)
at Object.run (/usr/local/lib/node_modules/coffee-script/lib/coffee-script/command.js:76:32)
at Object.<anonymous> (/usr/local/lib/node_modules/coffee-script/bin/coffee:7:41)
at Module._compile (module.js:432:26)
at Object..js (module.js:450:10)
at Module.load (module.js:351:31)
at Function._load (module.js:310:12)
at Array.0 (module.js:470:10)
at EventEmitter._tickCallback (node.js:192:40)
I need your help
This is a design decision on the part of the CoffeeScript devs.
https://github.com/jashkenas/coffee-script/issues/2813
The CoffeeScript REPL no longer supports Node v0.6. You should be able to compile by passing a file though. If you want it to work, you will either need to use an older version of CoffeeScript, or a newer version of Node.
I have been looking around for the best framework with nodejs. I am starting to lean twords Zappa. I was testing it out and everything was working fine until I started a new project and reinstalled it with npm.
Now any time I do anything with it, it throws this error.
This
require('zappa') ->
console.log "Hello World!"
Becomes
TypeError: Cannot read property 'prototype' of undefined
at Object.<anonymous> (/home/giodamelio/Projects/node-boilerplate/node_modules/zappa/lib/zappa.js:65:15)
at Object.<anonymous> (/home/giodamelio/Projects/node-boilerplate/node_modules/zappa/lib/zappa.js:702:4)
at Module._compile (module.js:446:26)
at Object..js (module.js:464:10)
at Module.load (module.js:353:31)
at Function._load (module.js:311:12)
at Module.require (module.js:359:17)
at require (module.js:375:17)
at Object.<anonymous> (/home/giodamelio/Projects/node-boilerplate/src/app.coffee:3:3)
at Object.<anonymous> (/home/giodamelio/Projects/node-boilerplate/src/app.coffee:52:4)
What happened?
Recently I just had a similar problem with zappa 0.3.3
Apparently the creator of zappa is on vacation and doesn't update to the current versions of node.js, but you may use zappajs instead. It's a fork that is a little more up-to-date.
npm install zappajs
And use require('zappajs') instead of require('zappa').
I just started using node.js for my project and tried making a connection to MySQL and inserting basic values. But I keep getting the following error:
node.js:201
throw e; // process.nextTick error, or 'error' event on first tick
^
Error: Unable to load shared library /Users/****/nodeJS/node_modules/db-mysql/build/Release/mysql_bindings.node
at Object..node (module.js:472:11)
at Module.load (module.js:348:31)
at Function._load (module.js:308:12)
at Module.require (module.js:354:17)
at require (module.js:370:17)
at Object.<anonymous> (/Users/****/nodeJS/node_modules/db-mysql/db-mysql.js:18:15)
at Module._compile (module.js:441:26)
at Object..js (module.js:459:10)
at Module.load (module.js:348:31)
at Function._load (module.js:308:12)
I did as was instructed, I specified the MYSQL_CONFIG environment variable:
$ export MYSQL_CONFIG=/usr/local/mysql/bin/mysql_config
maybe it's too late and I hope you solved this problem on your own, but it might be useful for other people experiencing the same issue.
What I did to solve it is to set the following variable:
export DYLD_LIBRARY_PATH=<your absolute path to mysql lib folder>
in my case it is:
export DYLD_LIBRARY_PATH=/usr/local/mysql-5.5.25-osx10.6-x86_64/lib/
Tested on MacOS Lion 10.7.4