I am trying to implement this program on my window system but i am getting this error .
Administrator#rahul ~/nodepad
$ node app.js
native library not built
Express server listening on port 3000, environment: development
Using connect 0.5.9, Express 1.0.7, Jade 0.6.3
node.js:50
throw e; // process.nextTick error, or 'error' event on first tick
^
Error: EPERM, Operation not permitted
at Stream._onConnect (net.js:687:18)
at IOWatcher.onWritable [as callback] (net.js:284:12)
Please suggest why this errror is coming .
Thanks
Have you started a mongodb instance? Nodepad app requires a MongoDB database to work.
Get a precompiled package from http://www.mongodb.org, unzip and create a "data" directory. then run "mongod --dbpath ./data" from the bin dir (use your 'data' path).
Sometimes Node.js stacktraces are cryptic.
If you meant to say "my Windows system" and you have built a WIN32 version of node, then it is likely that the permissions related code has not yet been implemented.
I suggest that you try the Cygwin version. I have sucessfully built 0.5.0pre on Cygwin. If you don't have Cygwin, it is easy to install on XP or Win7. You don't need all of it, just the base install and the packages mentioned here: https://github.com/ry/node/wiki/Building-node.js-on-Cygwin-(Windows)
Related
I am not a developer but I am asked to migrate a release 1.3.4.1 Meteor deployment to a new (CentOS 7) platform. The original company vanished and the app developer is gone and not cooperating ... :(
Only thing as far as I know is the release.
When I run the following command on the new server:
meteor run --port 3000 --release 1.3.4.1
I see a lot of things (downloading packages, building, linking, ..) running well but after some minutes I end up with a syntax error in the build modules.js when the app is started:
[meteor#rfcwerkboek rfc-project]$ meteor run --port 3000 --release 1.3.4.1
[[[[[ ~/prod/rfc-project ]]]]]
=> Started proxy.
W20190116-00:49:49.745(1)? (STDERR)
W20190116-00:49:50.037(1)? (STDERR) /home/meteor/prod/rfc-project/.meteor/local/build/programs/server/packages/modules.js:26622
W20190116-00:49:50.038(1)? (STDERR) matches.forEach(nextMatch => {
W20190116-00:49:50.038(1)? (STDERR) ^
W20190116-00:49:50.039(1)? (STDERR) SyntaxError: Unexpected token >
W20190116-00:49:50.039(1)? (STDERR) at /home/meteor/prod/rfc-project/.meteor/local/build/programs/server/boot.js:292:30
W20190116-00:49:50.040(1)? (STDERR) at Array.forEach (native)
W20190116-00:49:50.041(1)? (STDERR) at Function._.each._.forEach (/home/meteor/.meteor/packages/meteor-tool/.1.3.4_1.wmvsc.7d2bga++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/server-lib/node_modules/underscore/underscore.js:79:11)
W20190116-00:49:50.041(1)? (STDERR) at /home/meteor/prod/rfc-project/.meteor/local/build/programs/server/boot.js:133:5
=> Exited with code: 8
The piece of code in modules.js where the syntax error occurs is:
var fileFound = null;
matches.forEach(nextMatch => {
if( fileFound !== null ) return;
if( nextMatch[1].length < 1 ){
fileFound = new Buffer(0);
return;
}
Removing the build and starting the process again does not solve the issue.
Just some now a I discovered a file called .node_version.txt in .meteor/local/build/ which says:
v0.10.45
My new CentOS 7 distro has nodejs version:
[meteor#rfcwerkboek rfc-project]$ node --version
v6.14.3
I guess that's probably the cause of the problem. Am I right? If I am right should I downgrade nodejs by removing the standard nodejs RPM's and compile and old version from scratch?
Meteor is shipped with a builtin node binary, so you don't require a node installation at your development system.
However, if your CentOS is your targeted server where your app will be deployed you need the exact node version to be installed in order to execute your bundled app (but no Meteor install is required on the server).
Background
Meteor itself is mainly a development framework, which combines good practices and tools and bundles all that code into a node application, that runs like every other node application.
In oder to get the node version, that is required to be installed on your server you can go to your project directory and let Meteor print it's node version:
$ cd myproject
$ meteor node -v
0.10.45
which would be for example the node version for a Meteor 1.7 release. So if you want to run your build on your server it requires this node version.
Note, that if the version from the command differs with the one from the .node_version.text then the version you receive from meteor node -v is the one that is used when running meteor build and that should be installed on the server.
The Meteor guide on custom deployment is summarizing this in an understandable way and should be consulted as further readig. Resolving this issue should also solve the error.
Long story short
Meteor is a development framework with a shipped node binary
Your server does not require Meteor to be installed
The local development OS does not require an additional node installation
All npm commands on the development machine should be executed using meteor npm <command>
The server requires the same node version as the one that is shipped with Meteor
Just installed Mongo, mongodb driver and node. All current stable versions on a Ubuntu 14.04
mongo --version
MongoDB shell version: 3.2.1
node --version
v5.2.0
I'm pretty new to koa/mongo/node so I clone some github repos, but when I run code I always get this error:
{ [Error: Cannot find module '../build/Release/bson'] code: 'MODULE_NOT_FOUND' }
js-bson: Failed to load c++ bson extension, using pure JS version
Similar erros on stackoverflow are for older versions and there was either not clear solution or not working in my case.
How is the workflow? What is this extension for?
I tried reinstalling build-essential and node-gyp but without knowing the reason. Maybe is related to the monk or mongoose version if the projects are "old"?
You may be missing some build tools on your system.
In that case mongo driver will fallback to using a Javascript version of the bson parser, which is fine for development, but probably not in production.
Here is the solution:
cp ProjectDirectory/node_modules/monk/node_modules/mongodb/node_modules/bson/browser_build/bson.js ProjectDirectory/node_modules/monk/node_modules/mongodb/node_modules/bson/build/Release
I think you can use also move, I never tried.
The error message tell you bson.js is missing in "../build/Release folder", so you only have to put the file in the right place
My app was working perfectly until I installed the accounts-facebook and service-configuration package. Now it's giving this error and I have absolutely no idea how to fix it:
/Users/###/.meteor/packages/meteor-tool/.1.1.3.1eul34x++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/fibers/future.js:245
throw(ex);
^
Error: Can't find npm module 'mongodb'. Did you forget to call 'Npm.depends' in package.js within the 'cfs_gridfs' package?
at Object.Npm.require (/Users/###/proyectos/leads/.meteor/local/build/programs/server/boot.js:155:17)
at Package (packages/cfs:gridfs/gridfs.server.js:2:1)
at /Users/###/proyectos/leads/.meteor/local/build/programs/server/packages/cfs_gridfs.js:189:4
at /Users/###/proyectos/leads/.meteor/local/build/programs/server/packages/cfs_gridfs.js:196:3
at /Users/###/proyectos/leads/.meteor/local/build/programs/server/boot.js:222:10
at Array.forEach (native)
at Function._.each._.forEach (/Users/###/.meteor/packages/meteor-tool/.1.1.3.1eul34x++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/underscore/underscore.js:79:11)
at /Users/###/proyectos/leads/.meteor/local/build/programs/server/boot.js:117:5
Exited with code: 8
Your application is crashing. Waiting for file change.
What worked for me was simply hitting "Control + C" to stop my app and then running "meteor run" again.
Do you have the cfs_gridfs package?
Your console reference that package in the error
If you're using mrt it means that you're using an old version of Meteor. Once in a while I had similar issues and I would simply edit the file .meteor/packages and the problem was solved when I run meteor command. I'm not sure if the same applies here.
I am fairly new at node.js, I am using the most recent node.js available .12 on windows 8.1 OS. I am tring to run a program that controls some robotics using a gesture control device, but whenever I run the node server.js I receive the following:
module.js:338
throw error
module cannot be found 'simple debug'
I ran npm install simple debug to see if the modules didn't install correctly with original node.js. There are two modules simple and debug and they are installed. I tried the faye install and express solutions and got nothing.
Does anyone have any ideas how to solve this?
Assuming you're using this module, you should consider adding the hyphen for simple-debug instead of simple debug.
I am having trouble using the Cloud9 IDE to run files which use bonescript on a BeagleBone with the pre-installed version of Angstrom Linux. I am using Cloud9 at http://beaglebone.local:3000 in Chrome 18 on OSX 10.7.
When I run the Bonescript blinkled.js sample code Cloud9 outputs this error:
Output
node.js:134
throw e; // process.nextTick error, or 'error' event on first tick
^
Error: Cannot find module '/var/lib/cloud9'
at Function._resolveFilename (module.js:326:11)
at Function._load (module.js:271:25)
at Array.<anonymous> (module.js:430:10)
at EventEmitter._tickCallback (node.js:126:26)
If I try adding a file path in the run configuration as suggested in this StackOverflow question I get this error in the Console (in bright red mind you):
[C9 Server Exception 2] undefined
At this point Cloud9 also stops responding and I have to reload the page to attempt to use it further.
If I add "blinkled.js" as the file path I get this error:
'inotify' not loaded
If desired, try installing it with:
curl http://npmjs.org/install.sh | bash
npm install inotify
'fibers' not loaded
If desired, try installing it with:
curl http://npmjs.org/install.sh | bash
npm install fibers
Delay operations loops will consume CPU cycles
Invoke using 'node-fibers' if node version < 0.5.2
No idea what I should put in there.
I've been Googling these various errors for about 24 hours now.
This seems like a great tool, if I can only get it to work. Any ideas?
UPDATE 1
After realizing the opkg had failed to load the required inotify and fibers packages I installed them manually and tried again. Now I get this error on the command line:
# node blinkled.js
gpio: 38 already exported.
{ [Error: EBUSY, resource busy or locked] errno: 10, code: 'EBUSY', syscall: 'write' }
Unable to export gpio: 56
Now I realize there were multiple problems:
First, I should have checked the documentation to get node.js to work. I just assumed alert() was a function when I should have been using console.log(). So once I realized this I was able to run this file in Cloud9:
var hello = "hello world"
console.log(hello);
Second, When I tried to install the libraries (inotify and fibers) using the npm package manager it placed them in the node_modules directory in my working directory:
/home/root/
... not the default Cloud9 root directory as I assumed it would:
/var/lib/cloud9
Third, my pins were already exported, which was fixed by simply restarting the BeagleBone.
Finally, I found that creating a new instance in my home directory with the latest version of bonescript allowed me to run the blinkled.js sample file, as well as this file which tests all analog pins on the BeagleBone from the command line.
You might do a 'git pull' in /var/lib/cloud9 to get an update. One thing I've added is an 'analogRead' function.
i bough beagle bone rev. A4. this kind of error is comming on that also.
i have just make new SD card with latest angstrom image, and then after blinky is working properly.