I'm trying to debug node application, I'm using IntelliJ IDEA 14.0.5 and nodejs 6.10.2. The app configuration seems to be ok, actually the application is running but when I try to debug the application I'm facing this error :
"C:\Program Files (x86)\JetBrains\IntelliJ IDEA 14.0.5\bin\runnerw.exe" "C:\Program Files\nodejs\node.exe" --debug-brk=60858 --nolazy server.js
Debugger listening on [::]:60858
{ Error: ENOENT: no such file or directory, open 'c:\My\Project\Working\Folder\myapp\internal\streams\lazy_transform.js'
at Error (native)
at Object.fs.openSync (fs.js:641:18)
at eval (eval at <anonymous> (internal/streams/lazy_transform.js:1:1), <anonymous>:49:17)
at eval (eval at <anonymous> (internal/streams/lazy_transform.js:1:1), <anonymous>:73:5)
at internal/streams/lazy_transform.js:1:1
at ContextifyScript.Script.runInThisContext (vm.js:25:33)
at runInThisContext (bootstrap_node.js:404:19)
at NativeModule.compile (bootstrap_node.js:491:18)
at NativeModule.require (bootstrap_node.js:437:18)
at crypto.js:24:23
errno: -4058,
code: 'ENOENT',
syscall: 'open',
path: 'c:\\\My\\Project\\Working\\Folder\\myapp\\internal\\streams\\lazy_transform.js' }
And other internals: child_process.js, socket_list.js and cluster.js
Could be something related to wrong debugger version ?
Missing some configuration ?
Thank you in advice,
Andrea
Node 6.* debugging is only supported since Idea 2016.2. V8 debugging protocol has changed dramatically since the time Idea 14 was released.
You have to either upgrade Idea or downgrade Node.js... to v 4.* may be, or even to 0.10
Related
I'm trying to Archive React Native app, but I'm receiving this error:
Error: EMFILE: too many open files, watch
at FSEvent.FSWatcher._handle.onchange (internal/fs/watchers.js:178:28)
Emitted 'error' event on NodeWatcher instance at:
at NodeWatcher.checkedEmitError (/Users/username/Dev/project/node_modules/sane/src/node_watcher.js:143:12)
at FSWatcher.emit (events.js:376:20)
at FSEvent.FSWatcher._handle.onchange (internal/fs/watchers.js:184:12) {
errno: -24,
syscall: 'watch',
code: 'EMFILE',
filename: null
}
Building an app via a simulator or real device works well, the only problem is when I try to run Archive.
I have installed watchman so that is not the issue.
Here is my setup:
MacBook Pro (13-inch, M1, 2020)
BigSur 11.4
React Native: 0.62.3
Node: v12.22.1
xCode: 12.5
Did anyone face the same issue, is there any solution how to fix this?
A year ago I've made a project for a course: https://github.com/GeorgeFlorian/Finished_link_project
Now, I am trying to make it work on my machine, but I have no luck.
I've got npm 7.13.0 and node 16.1.0.
I've ran npm update in order to update all the depencies.
Steps
I've cloned the repo into a PC than runs Linux Mint 20.1
I've ran npm install
npm update
npm run build and npm run serve return the same error:
georgeflorian#georgeflorian-desktop:~/New Volume/VSCode Projects/Finished_link_project$ npm run build
> proiect-link#0.1.0 build
> vue-cli-service build
таз Building for production...
ERROR Failed to compile with 1 error 2:55:41 PM
Syntax Error: TypeError: Cannot read property 'parseComponent' of undefined
You may use special comments to disable some warnings.
Use // eslint-disable-next-line to ignore the next line.
Use /* eslint-disable */ to ignore all warnings in a file.
ERROR Build failed with errors.
I have no idea how to trace the error: Syntax Error: TypeError: Cannot read property 'parseComponent' of undefined.
Also, the NodeJS server won't start:
georgeflorian#georgeflorian-desktop:~/New Volume/VSCode Projects/Finished_link_project/server$ node app.js
node:internal/fs/utils:343
throw err;
^
Error: ENOENT: no such file or directory, stat '/home/georgeflorian/New Volume/VSCode Projects/Finished_link_project/dist/favicon.ico'
at Object.statSync (node:fs:1527:3)
at resolveSync (/home/georgeflorian/New Volume/VSCode Projects/Finished_link_project/node_modules/serve-favicon/index.js:187:17)
at favicon (/home/georgeflorian/New Volume/VSCode Projects/Finished_link_project/node_modules/serve-favicon/index.js:61:12)
at Object.<anonymous> (/home/georgeflorian/New Volume/VSCode Projects/Finished_link_project/server/app.js:46:9)
at Module._compile (node:internal/modules/cjs/loader:1109:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1138:10)
at Module.load (node:internal/modules/cjs/loader:989:32)
at Function.Module._load (node:internal/modules/cjs/loader:829:14)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:76:12)
at node:internal/main/run_main_module:17:47 {
errno: -2,
syscall: 'stat',
code: 'ENOENT',
path: '/home/georgeflorian/New Volume/VSCode Projects/Finished_link_project/dist/favicon.ico'
}
I believe that many dependencies are deprecated, but this begs two questions:
If it worked back then and it hasn't been touched since, why doesn't it work now ?
How can I fix all the deprecated dependencies if npm update did not fix them ?
Ultimately, I would like to learn how to approach this kind of situation. Thank you.
I am having an issue with Nodemailer on Heroku and I would really appreciate your help.
A previous version of my application used to work on Heroku with no problem and when I roll back to that version, it still works fine. In the latest version of the application, I have made no changes to the code accesses Nodemailer so this doesn't really make sense to me.
The version of nodemailer is: 0.6.5
Here is the log message:
2015-02-18T04:29:57.730815+00:00 app[web.2]: POST /employer/53f44e3df4f8150200554eb7/job/ 200 32ms - 581b
2015-02-18T04:29:58.045066+00:00 app[web.2]: /app/node_modules/nodemailer/node_modules/simplesmtp/lib/client.js:918
2015-02-18T04:29:58.045069+00:00 app[web.2]: this._xoauth2.reconnectCount = 0;
2015-02-18T04:29:58.045070+00:00 app[web.2]: ^
2015-02-18T04:29:58.041300+00:00 app[web.2]: Exit callback being invoked
2015-02-18T04:29:58.045072+00:00 app[web.2]: TypeError: Cannot assign to read only property 'reconnectCount' of false
2015-02-18T04:29:58.045073+00:00 app[web.2]: at SMTPClient._actionAUTHComplete (/app/node_modules/nodemailer/node_modules/simplesmtp/lib/client.js:918:34)
2015-02-18T04:29:58.045075+00:00 app[web.2]: at SMTPClient._onData (/app/node_modules/nodemailer/node_modules/simplesmtp/lib/client.js:352:29)
2015-02-18T04:29:58.045076+00:00 app[web.2]: at TLSSocket.emit (events.js:107:17)
2015-02-18T04:29:58.045078+00:00 app[web.2]: at readableAddChunk (_stream_readable.js:163:16)
2015-02-18T04:29:58.045079+00:00 app[web.2]: at TLSSocket.Readable.push (_stream_readable.js:126:10)
2015-02-18T04:29:58.045080+00:00 app[web.2]: at TCP.onread (net.js:529:20)
2015-02-18T04:29:58.769185+00:00 heroku[web.2]: Process exited with status 1
2015-02-18T04:29:58.780771+00:00 heroku[web.2]: State changed from up to crashed
2015-02-18T04:29:58.780771+00:00 heroku[web.2]: State changed from crashed to starting
2015-02-18T04:30:00.371578+00:00 heroku[web.2]: Starting process with command `node app.js`
2015-02-18T04:30:01.904015+00:00 app[web.2]: Detected 512 MB available memory, 512 MB limit per process (WEB_MEMORY)
2015-02-18T04:30:01.904115+00:00 app[web.2]: Recommending WEB_CONCURRENCY=1
2015-02-18T04:30:02.288471+00:00 app[web.2]: Failed to load c++ bson extension, using pure JS version
2015-02-18T04:30:02.652326+00:00 app[web.2]: Started in PROD mode
2015-02-18T04:30:02.815284+00:00 app[web.2]: Express server listening on port 9622
2015-02-18T04:30:03.291115+00:00 heroku[web.2]: State changed from starting to up
We can see that it is failing on line 918 of 'client.js' with the error of:
TypeError: Cannot assign to read only property 'reconnectCount' of false.
Why would it be trying to assign 'false' to 'reconnectCount'?
My code is really simple:
app.locals.smtpTransport = nodemailer.createTransport('SMTP', {
service: 'Gmail',
auth: {
user: "example#gmail.com",
pass: "pass123"
}
});
I then use the code to send mail like:
req.app.locals.smtpTransport.sendMail( ......
This code works on my staging instance of Heroku so that doesn't make sense to me.
I have logged a support request with Heroku and any guidance that you can provide I will pass onto them.
Thanks so much for your help.
I just got the following response back from Nodemailer:
You are probably running Nodemailer in iojs. Only the latest version of Nodemailer is suported in node 0.12 and iojs, so you should either upgrade or fix the line 918 yourself like this:
if(this._xoauth2){
this._xoauth2.reconnectCount = 0;
}
Setting properties to boolean values was allowed in ES5 but iojs runs ES6 and trying to set a property in ES6 strict mode throws an error.
I think I have fixed this by by explicitly setting the node.js version in my package file to an older version that uses ES5.
This has fixed my problem. Lesson learned is to always set the nodejs version in the package file otherwise Heroku uses the latest version and it may be incompatible with your modules.
Many thanks to Nodemailer, they got back to me super quick with a great response.
Hopefully this will help someone else.
Thanks.
I'm working with meteor on an ubuntu install and I was getting similar errors after upgrading to Node.js v12.0 and installing Meteor's accounts-password module.
Turned out, since Meteor has not yet begun development on compatibility with Node.js v12.0, the new binaries installed with Node on my server were not compatible with the binaries bundled with my deployment so I was getting similar errors. In this case, the problem was not with Nodemailer but with simplesmtp.
As suggested here, the solution was to remove the bundled version and use npm to install a server-local version.
So in my deployment script, I added the following lines after I built the bundle.
cd bundle/programs/server/
sudo rm -R ./npm/npm-bcrypt/node_modules/bcrypt
sudo npm install bcrypt
sudo rm -R ./npm/email/node_modules/simplesmtp
sudo npm install simplesmtp
This is easier than modifying the source, especially if you have a scripted deployment.
When I run jsonplaceholder I get:
jsonplaceholder
JSONPlaceholder listening on http://localhost:3000
fs.js:432
return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
^
Error: ENOENT, no such file or directory 'data.json'
at Object.fs.openSync (fs.js:432:18)
at Object.fs.readFileSync (fs.js:286:15)
at Object.index.load (/usr/local/lib/node_modules/jsonplaceholder/node_modules/json-server/node_modules/lowdb/node_modules/underscore.db/src/node.js:11:24)
at Function.low.load (/usr/local/lib/node_modules/jsonplaceholder/node_modules/json-server/node_modules/lowdb/lib/index.js:110:29)
at reset (/usr/local/lib/node_modules/jsonplaceholder/index.js:6:14)
at Server.<anonymous> (/usr/local/lib/node_modules/jsonplaceholder/index.js:14:3)
at Server.g (events.js:180:16)
at Server.EventEmitter.emit (events.js:92:17)
at net.js:1052:10
at process._tickCallback (node.js:415:13)
Im on Ubuntu 13.10
Project's author here. Just to let you know, finally, this (old) bug was fixed. Sorry for the inconvenience caused.
I'm still not sure if this has anything to do with an outdated module, or a messed up npm installation or maybe I'm just lucky, but basically the problem is that the path to access "data.json" is wrong (maybe not wrong but incomplete).
What I did was open file:
gksudo gedit /usr/local/lib/node_modules/jsonplaceholder/index.js
and modify the following function:
function reset() {
// server.low.load('data.json') <-- ORIGINAL LINE
server.low.load(require('path').resolve(__dirname, 'data.json')); //<--MY FIX
}
Just save the file, and run jsonplaceholder again.
Requirejs with nodejs doesn't tell me the line number of the error, just the error
For example the result is: Error: Evaluating ccc.js as module "ccc" failed with error: SyntaxError: Unexpected token ,
And then the stack:
at Function.req.load (D:\web\pc\node_modules\requirejs\bin\r.js:2470:23)
at Object.context.load (D:\web\pc\node_modules\requirejs\bin\r.js:1858:21)
at Object.Module.load (D:\web\pc\node_modules\requirejs\bin\r.js:1059:29)
at Object.Module.fetch (D:\web\pc\node_modules\requirejs\bin\r.js:1049:66)
at Object.Module.check (D:\web\pc\node_modules\requirejs\bin\r.js:1079:26)
at Object.Module.enable (D:\web\pc\node_modules\requirejs\bin\r.js:1376:22)
at Object.context.enable (D:\web\pc\node_modules\requirejs\bin\r.js:1730:39)
at Object.<anonymous> (D:\web\pc\node_modules\requirejs\bin\r.js:1361:33)
at g (D:\web\pc\node_modules\requirejs\bin\r.js:363:23)
at each (D:\web\pc\node_modules\requirejs\bin\r.js:291:31)
at Object.Module.enable (D:\web\pc\node_modules\requirejs\bin\r.js:1323:17)
at Object.Module.init (D:\web\pc\node_modules\requirejs\bin\r.js:1013:26)
at callGetModule (D:\web\pc\node_modules\requirejs\bin\r.js:1403:63)
at Object.context.completeLoad (D:\web\pc\node_modules\requirejs\bin\r.js:1763:21)
at Function.req.load (D:\web\pc\node_modules\requirejs\bin\r.js:2510:17)
at Object.context.load (D:\web\pc\node_modules\requirejs\bin\r.js:1858:21)
at Object.Module.load (D:\web\pc\node_modules\requirejs\bin\r.js:1059:29)
at Object.Module.fetch (D:\web\pc\node_modules\requirejs\bin\r.js:1049:66)
at Object.Module.check (D:\web\pc\node_modules\requirejs\bin\r.js:1079:26)
at Object.Module.enable (D:\web\pc\node_modules\requirejs\bin\r.js:1376:22)
at Object.context.enable (D:\web\pc\node_modules\requirejs\bin\r.js:1730:39)
at Object.<anonymous> (D:\web\pc\node_modules\requirejs\bin\r.js:1361:33)
at g (D:\web\pc\node_modules\requirejs\bin\r.js:363:23)
at each (D:\web\pc\node_modules\requirejs\bin\r.js:291:31)
at Object.Module.enable (D:\web\pc\node_modules\requirejs\bin\r.js:1323:17)
at Object.Module.init (D:\web\pc\node_modules\requirejs\bin\r.js:1013:26)
at Object.context.makeRequire.mixin.isBrowser [as _onTimeout] (D:\web\pc\node_modules\requirejs\bin\r.js:1646:36)
at Timer.list.ontimeout (timers.js:101:19)
And where the error is? I know the file but what line?
thanks for help
It's not a problem with requirejs and was fixed in nodejs version 0.12.
Unfortunately, there are not enough hooks into vm.runInThisContext in
older node versions to get to the information.
More info you can find here
So, nodejs v.0.10 doesn't want to show additional info about problem. But if you want - you can install newest version of nodejs and gets more info about syntax errors in "required" files.
By the way, with Docker it's pretty easy - all you need just pull repo from node:0.12.