node-notifier
node-notifier copied to clipboard
Error: spawn ENAMETOOLONG on Windows 10
On Windows 10 the plugin fails if path is too long:
Error: spawn ENAMETOOLONG
[ERROR] at exports._errnoException (util.js:907:11)
[ERROR] at ChildProcess.spawn (internal/child_process.js:298:11)
[ERROR] at exports.spawn (child_process.js:362:9)
[ERROR] at Object.exports.execFile (child_process.js:151:15)
[ERROR] at Object.module.exports.fileCommand (D:\projects\ abc\ abc-parent\ abc-webapp\node_modules\node-notifier\lib\utils.js:53:13)
[ERROR] at WindowsToaster.notify (D:\projects\abc\abc-parent\abc-webapp\node_modules\node-notifier\notifiers\toaster.js:65:9)
I found a similiar issue: https://github.com/jsreport/jsreport/issues/202#issuecomment-206760198
Maybe that helps
or maybe this one is better: https://github.com/karma-runner/grunt-karma/pull/163/files
Interesting. Will look into it as soon as I have the time to deep dive into it. To me it looks like karma plugin has solved it by using fork instead of spawn, but that wouldn't do much for this as we don't have a node process, but an actual remote executable. Must be others having this issue too, one would think.
Any news on this one, we are having the same issue :-(
We were planning on moving from Toast to KDE's snoretoast, but i'm unsure if this bug is limited to just the binary/program, or if it's a problem with Windows 10's notifications system. Otherwise, no progress has been made on this issue as of yet.
Could you possibly test out using the latest https://github.com/mikaelbr/node-notifier/pull/134?
I am using the latest 4.6.1
But do you have the same issue if you try using https://github.com/mikaelbr/node-notifier/pull/134 ?
I'm new to npm, how do I update my node_module with this #134 from npm ?
Should be npm install @master-aul/node-notifier
it says not found :-(
NB: Try without the @
before master-aul
. npm install @master-aul/node-notifier
will try to install node-notifier
as a package on the @master-aul
scope, but npm install master-aul/node-notifier
will try to install from the master branch of the github repo node-notifier
of the user master-aul
.
So this should work:
npm install master-aul/node-notifier
Ah, didn't know that. Thanks!
I know you can also npm install https://github.com/master-atul/node-notifier.git
though. Bit longer, your method's better..
Initially I thought this was due to too many nested directories and the vendor files getting too long path, but I think it might not be the case. Maybe. Could you show me the output command line when getting the error?
You can see the output by installing current master:
npm i mikaelbr/node-notifier
and run your files by prefixing DEBUG=true
(if on mac). See https://github.com/mikaelbr/node-notifier/blob/master/CONTRIBUTE.md
got this today:
It's been working great for weeks, not sure why it's now failing
Error: spawn ENAMETOOLONG
at _errnoException (util.js:1024:11)
at ChildProcess.spawn (internal/child_process.js:323:11)
at exports.spawn (child_process.js:502:9)
at Object.exports.execFile (child_process.js:212:15)
at Object.module.exports.fileCommand (f:\Github\eth-client\node_modules\node-notifier\lib\utils.js:53:13)
at WindowsToaster.notify (f:\Github\eth-client\node_modules\node-notifier\notifiers\toaster.js:65:9)
at WebpackBuildNotifierPlugin.onCompilationDone (f:\Github\eth-client\node_modules\webpack-build-notifier\index.js:172:18)
at Compiler.applyPlugins (f:\Github\eth-client\node_modules\tapable\lib\Tapable.js:61:14)
at Watching._done (f:\Github\eth-client\node_modules\webpack\lib\Compiler.js:104:17)
at onCompiled (f:\Github\eth-client\node_modules\webpack\lib\Compiler.js:54:18)
at applyPluginsAsync.err (f:\Github\eth-client\node_modules\webpack\lib\Compiler.js:514:14)
at next (f:\Github\eth-client\node_modules\tapable\lib\Tapable.js:202:11)
at Compiler.