when i try to run a file with IntelliJ it does not recognize the Mongo CLI commands like mongodump
but what is weird is that when trying to run the same command on my local machine in the terminal it's there, the same goes when trying to do it manually on the terminal tab in IntelliJ ,
i am using zsh
/bin/sh: mongodump: command not found
at ChildProcess.exithandler (node: child process: 397:12)
at ChildProcess.emit (node: events: 390:28)
at ChildProcess.emit (node: domain:475:12)
at maybeClose (node: internal/child process: 1064:16)
at Socket. <anonymous> (node: internal/child process: 450:11)
at Socket.emit (node: events:390:28)
at Socket.emit (node: domain: 475:12)
at Pipe.<anonymous> (node:net:687:12)
at Pipe.callbackTrampoline (node: internal/async hooks:130:17)
this is the message i get when running the file through IntelliJ
Related
I'm using NodeJS 10 and Electron 10 (both of which are quite old). I'm trying to install a local custom module, which I'm including using the answer at How to specify local modules as npm package dependencies. But when I then run
npm install
I see the following error
⨯ open C:\Development\my-project\node_modules\my-custom-module\package.json: The data present in the reparse point buffer is invalid.
github.com/develar/app-builder/pkg/node-modules.(*Collector).resolveDependency
/Volumes/data/Documents/app-builder/pkg/node-modules/nodeModuleCollector.go:192
github.com/develar/app-builder/pkg/node-modules.(*Collector).processDependencies
/Volumes/data/Documents/app-builder/pkg/node-modules/nodeModuleCollector.go:95
github.com/develar/app-builder/pkg/node-modules.(*Collector).readDependencyTree
/Volumes/data/Documents/app-builder/pkg/node-modules/nodeModuleCollector.go:56
github.com/develar/app-builder/pkg/node-modules.ConfigureCommand.func1
/Volumes/data/Documents/app-builder/pkg/node-modules/tree.go:41
github.com/alecthomas/kingpin.(*actionMixin).applyActions
/Volumes/data/go/pkg/mod/github.com/alecthomas/kingpin#v2.2.6+incompatible/actions.go:28
github.com/alecthomas/kingpin.(*Application).applyActions
/Volumes/data/go/pkg/mod/github.com/alecthomas/kingpin#v2.2.6+incompatible/app.go:557
github.com/alecthomas/kingpin.(*Application).execute
/Volumes/data/go/pkg/mod/github.com/alecthomas/kingpin#v2.2.6+incompatible/app.go:390
github.com/alecthomas/kingpin.(*Application).Parse
/Volumes/data/go/pkg/mod/github.com/alecthomas/kingpin#v2.2.6+incompatible/app.go:222
main.main
/Volumes/data/Documents/app-builder/main.go:90
runtime.main
/usr/local/Cellar/go/1.14.2_1/libexec/src/runtime/proc.go:203
runtime.goexit
/usr/local/Cellar/go/1.14.2_1/libexec/src/runtime/asm_amd64.s:1373
⨯ C:\Development\my-project\node_modules\app-builder-bin\win\x64\app-builder.exe exited with code ERR_ELECTRON_BUILDER_CANNOT_EXECUTE stackTrace=
Error: C:\Development\my-project\node_modules\app-builder-bin\win\x64\app-builder.exe exited with code ERR_ELECTRON_BUILDER_CANNOT_EXECUTE
at ChildProcess.childProcess.once.code (C:\Development\my-project\node_modules\builder-util\src\util.ts:243:14)
at Object.onceWrapper (events.js:286:20)
at ChildProcess.emit (events.js:198:13)
at maybeClose (internal/child_process.js:982:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
Any ideas on what could cause this problem? The error message itself seems to pop up in relation to OneDrive.
I am trying to create a AWS Lambda function to merge pdf files stored in S3, and I am getting the following error:
Error: Command failed: java -jar "/var/task/node_modules/easy-pdf-merge/jar/pdfbox.jar" PDFMerger "samplepdf1.pdf" "samplepdf2.pdf" "merged.pdf"
/bin/sh: java: command not found
at ChildProcess.exithandler (child_process.js:294:12)
at ChildProcess.emit (events.js:198:13)
at maybeClose (internal/child_process.js:982:16)
at Socket.stream.socket.on (internal/child_process.js:389:11)
at Socket.emit (events.js:198:13)
at Pipe._handle.close (net.js:607:12)
killed: false,
code: 127,
signal: null,
cmd:
'java -jar "/var/task/node_modules/easy-pdf-merge/jar/pdfbox.jar" PDFMerger "samplepdf1.pdf" "samplepdf2.pdf" "merged.pdf"' }
I have installed and saved the npm module locally on windows, zipped it all and uploaded as aws lambda function with the following structure
myFunction.zip:
-node_modules
index.js
package.json
package-lock.json
The error is clear, you're trying to call the java command under a node lambda which is not going to work.
I suggest you create another lambda java function that will accept the pdf files to be merged and return the merged file to your original lambda function
I am attempting to have my node server launch a .exe file on a Linux hosted implementation of NODEJS
My .exe is located here: '/home/username/projects/ProjectName/server/webserver/Project.exe'
and when I attempt to start the exe
with:
exec('/home/username/projects/ProjectName/server/webserver/Project.exe', ["/home/username/projects/ProjectName/server/webserver/files/"+date], function(err, data) {
}
i am getting a file not fond error
that looks like this:
{ Error: Command failed: /home/username/projects/ProjectName/server/webserver/Project.exe /home/username/projects/ProjectName/server/webserver/files/31005
/home/username/projects/ProjectName/server/webserver/Project.exe: 1: /home/username/projects/ProjectName/server/webserver/Project.exe: MZ�##���#�#��: not found
/home/username/projects/ProjectName/server/webserver/Project.exe: 2: /home/username/projects/ProjectName/server/webserver/Project.exe: Syntax error: ")" unexpected
at ChildProcess.exithandler (child_process.js:294:12)
at ChildProcess.emit (events.js:198:13)
at maybeClose (internal/child_process.js:982:16)
at Socket.stream.socket.on (internal/child_process.js:389:11)
at Socket.emit (events.js:198:13)
at Pipe._handle.close (net.js:606:12)
killed: false,
code: 2,
signal: null,
cmd:
'/home/username/projects/ProjectName/server/webserver/Project.exe /home/username/projects/ProjectName/server/webserver/files/31005' }
When attempting to run the same function on a windows based NodeJS with windows directories instead of linux it works, the file can be opened via Wine on Linux, is there somewhere in my function call where i need to direct it to open the .exe with WINE? If so how do I go about doing that?
Try this
const { exec} = require('child_process');
exec('wine /home/username/projects/ProjectName/server/webserver/Project.exe /home/username/projects/ProjectName/server/webserver/files/'+date,
function(err, data){
});
https://superuser.com/questions/1058985/launch-program-with-wine-using-exe-arguments
https://stackoverflow.com/a/49069169/12167785
I got my desired functionality using the following:
exec("wine", ["/home/username/projects/ProjectName/server/webserver/Project.exe", date], function(err,data){
}
I am trying to run the protractor test from my windows machine.
Configuration Used:
OS : Windows 7
Node : 6.11.3
Protractor : 5.1.2
NPM : 3.10.10
I am unable to run the Protractor test because of the below error.
C:\Users\Admin>protractor conf.js [14:45:16] I/launcher - Running 1 instances of WebDriver [14:45:16] I/hosted - Using the selenium server at http://localhost:4444/wd/hub [14:45:18] E/launcher - Error code: 135 [14:45:18] E/launcher - Error message: ECONNREFUSED connect ECONNREFUSED 127.0.0 .1:4444 [14:45:18] E/launcher - Error: ECONNREFUSED connect ECONNREFUSED 127.0.0.1:4444
at ClientRequest.<anonymous> (C:\Users\Admin\AppData\Roaming\npm\node_module s\protractor\node_modules\selenium-webdriver\http\index.js:238:15)
at emitOne (events.js:96:13)
at ClientRequest.emit (events.js:188:7)
at Socket.socketErrorListener (_http_client.js:310:9)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at emitErrorNT (net.js:1277:8)
at _combinedTickCallback (internal/process/next_tick.js:80:11)
at process._tickCallback (internal/process/next_tick.js:104:9) From: Task: WebDriver.createSession()
at Function.createSession (C:\Users\Admin\AppData\Roaming\npm\node_modules\p rotractor\node_modules\selenium-webdriver\lib\webdriver.js:777:24)
at Function.createSession (C:\Users\Admin\AppData\Roaming\npm\node_modules\p rotractor\node_modules\selenium-webdriver\chrome.js:709:29)
at createDriver (C:\Users\Admin\AppData\Roaming\npm\node_modules\protractor\ node_modules\selenium-webdriver\index.js:167:33)
at Builder.build (C:\Users\Admin\AppData\Roaming\npm\node_modules\protractor \node_modules\selenium-webdriver\index.js:623:16)
at Hosted.getNewDriver (C:\Users\Admin\AppData\Roaming\npm\node_modules\prot ractor\lib\driverProviders\driverProvider.ts:60:29)
at Runner.createBrowser (C:\Users\Admin\AppData\Roaming\npm\node_modules\pro tractor\lib\runner.ts:225:39)
at q.then.then (C:\Users\Admin\AppData\Roaming\npm\node_modules\protractor\l ib\runner.ts:391:27)
at _fulfilled (C:\Users\Admin\AppData\Roaming\npm\node_modules\protractor\no de_modules\q\q.js:834:54)
at self.promiseDispatch.done (C:\Users\Admin\AppData\Roaming\npm\node_module s\protractor\node_modules\q\q.js:863:30)
at Promise.promise.promiseDispatch (C:\Users\Admin\AppData\Roaming\npm\node_ modules\protractor\node_modules\q\q.js:796:13) [14:45:18]
***E/launcher - Process exited with error code 135***
I keep receiving the error "E/launcher - Process exited with error code 135" noted in the stack-trace above. How can I get the protractor test to complete successfully?
Try doing below steps:-
Open cmd and in the home path use below commands.
webdriver-manager clean
webdriver-manager status
webdriver-manager update
webdriver-manager start.
It looks like You can't connect to the selenium server. Comment this :
seleniumAddress: 'http://localhost:4444/wd/hub'
and replace it with:
directConnect: true,
just to check if is working directly.
Also You can navigate directly to http://localhost:4444/wd/hub to see If you can access there. If not it might be some firewall or something similar.
First, open a command prompt and then
run the following command:
webdriver-manager start
Open a second command prompt then enter your command. Mine is protractor conf.js
Probably a bit late but I get this error when I fail to start server for web-driver using:
webdriver-manager start
Update the chrome driver using the command =>
webdriver-manager update --versions.chrome <73.0.3683.68>
after upgrading just install node modules once again using cmd => npm install
I m actually trying to use sitespeed.io and graphite together and I m facing a problem.
In fact, I want to use this commande line :
sitespeed.io -u http://google.com -b firefox --graphiteHost http://127.0.0.1:3000 --graphiteNamespace sitespeed.io.newyork
and here's the error that I get :
error: Error getting versions: { [Error: Command failed: /home/skahrz/.nvm/v0.11.16/lib/node_modules/sitespeed.io/node_modules/phantomjs/lib/phantom/bin/phantomjs --version
/home/skahrz/.nvm/v0.11.16/lib/node_modules/sitespeed.io/node_modules/phantomjs/lib/phantom/bin/phantomjs: error while loading shared libraries: libfontconfig.so.1: cannot open shared object file: No such file or directory
]
killed: false,
code: 127,
signal: null,
cmd: '/home/skahrz/.nvm/v0.11.16/lib/node_modules/sitespeed.io/node_modules/phantomjs/lib/phantom/bin/phantomjs --version' }
error: Error: Command failed: /home/skahrz/.nvm/v0.11.16/lib/node_modules/sitespeed.io/node_modules/phantomjs/lib/phantom/bin/phantomjs --version
/home/skahrz/.nvm/v0.11.16/lib/node_modules/sitespeed.io/node_modules/phantomjs/lib/phantom/bin/phantomjs: error while loading shared libraries: libfontconfig.so.1: cannot open shared object file: No such file or directory
at ChildProcess.exithandler (child_process.js:744:12)
at ChildProcess.emit (events.js:110:17)
at maybeClose (child_process.js:1008:16)
at Socket.<anonymous> (child_process.js:1176:11)
at Socket.emit (events.js:107:17)
at Pipe.close (net.js:476:12)
I dont know how to work through this and to well generate my sitespeed report.
Any ideas ?
If graphite is running on same host or different host doesnt matter- but carbon will be listening on 2003 and not 3000... 3000 is grafana default port.
you cannot pass the port like a normal url... if u want to pass graphite port to sitespeed... use --graphitePort 2003 or wherever your carbon is listening.