I'm trying to run an sbt command in yarn (any at all), and every time I run it I get this error
$ yarn sbt
yarn run v1.22.19
warning apache-daffodil-vscode#1.2.0: The engine "vscode" appears to be invalid.
$ sbt universal:packageBin
~\node_modules\argparse\argparse.js:362
throw new TypeError(sub('%s() missing %i required positional argument%s: %s',
^
TypeError: HelpFormatter() missing 1 required positional argument: 'prog'
at _parse_opts (~\node_modules\argparse\argparse.js:362:15)
at new HelpFormatter (~\node_modules\argparse\argparse.js:450:13)
at new HelpFormatter (~\node_modules\argparse\argparse.js:205:28)
at Object.<anonymous> (~\node_modules\sbt\backuptool.js:227:43)
at runFactory (~\node_modules\amdefine\amdefine.js:183:30)
at define (~\node_modules\amdefine\amdefine.js:277:13)
at Object.<anonymous> (~\node_modules\sbt\backuptool.js:13:1)
at Module._compile (node:internal/modules/cjs/loader:1159:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
at Module.load (node:internal/modules/cjs/loader:1037:32)
Directory tree shortened to make it look nicer.
yarn sbt just runs the command sbt universal:packageBin, which when ran alone in the command line works fine. If I change yarn sbt to just be simply sbt compile, or any other sbt command I get the same error, while the commands continue to work if just ran through the command line.
I've tried editing argparse to provide every option that it gives for default in the command line, but none of those work. The same exact code works fine on linux, but gives this error on both windows 10 and 11 on different machines.
Related
I'm trying to build a project that I have imported into eclipse.
I ran mvn clean which ran fine.
Running mvn install gives me the following error:
[WARNING] 'rpmbuild' is not recognized as an internal or external command,
[WARNING] operable program or batch file.
Failed to execute goal org.codehaus.mojo:rpm-maven-plugin:2.0-beta-2:rpm (default)
on project fusion-restful: RPM build execution returned: '1' executing 'cmd.exe /X /C
"rpmbuild -bb --buildroot C:\Users\kb60500\fusion-portal\fusion-restful\target\rpm\buildroot
--define "_topdir C:\Users\kb60500\fusion-portal\fusion-restful\target\rpm" --target noarch fusion-restful.spec"' -> [Help 1]
rpmbuild is a linux specific tool that is not available for windows by default. this tool is executed by the plugin. You can use cygwin to run it on windows but I would think the best results are created using a linux system to execute your build. There is a blog post about this (older but still looks correct).
I am trying to execute a small example of automated test using Webstorm, cucumber and protractor.
I have already installed cucumber using this command within the root of the project:
sudo npm install -g cucumber
I have already created the conf.js file and when running this command within the prompt:
> protractor conf.js
Finally, the output is:
*
[13:13:18] E/launcher - Error: Error: Cannot find module 'cucumber'
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object.module.exports.load (/Users/alfredo.bazo/node_modules/protractor-cucumber-framework/lib/cucumberLoader.js:19:24)
at Object.<anonymous> (/Users/alfredo.bazo/node_modules/protractor-cucumber-framework/index.js:8:33)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
[13:13:18] E/launcher - Process exited with error code 100
I have no idea what else I can do, any suggestions?
There are two approach to resolve your problem, and recommend to use approach 1).
1) install cucumber as project local package, rather than global package.
npm install -S cucumber
2) install cucumber as global package, and you need to add below Environment variable to tell node.exe where to find and load global package.
NODE_PATH=<npm global package install folder path on your machine>
you can execute npm config get prefix which will print out the global package install folder path.
Important: After add environment variable, you need to try in new opened cmd/terminal window.
how to overcome this :try to share video please regarding this query : ...
install cucumber as global package, and you need to add below Environment variable to tell node.exe where to find and load global package.
NODE_PATH=
you can execute npm config get prefix which will print out the global package install folder path.
Important: After add environment variable, you need to try in new opened cmd/terminal window.
I am trying to bundle the completely installed version of vsliveshare. To do that, I have to run the extension activation once because that downloads & installs additional files into the extension folder.
Now my instinct was to just run
% echo "require('./out/src/extension').activate()" | node
but that does not work out:
module.js:549
throw err;
^
Error: Cannot find module 'vscode'
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
...
I've done a npm install and the vscode module is present in node_modules.
Is there any trick I can use to get this to execute from the command line without having to run vscode itself?
I'm trying to use Eclipse for Parallel Application Developers to do some MPI stuff but I can't get the program to compile. Below is the error I'm getting in the console:
Description Resource Path Location Type
/bin/sh: mpic++: command not found prog C/C++ Problem
I use mpic++ from the command line (bash shell) to successfully compile programs. When I run the command using bourne shell I get an error.
/bin/sh mpic++
/usr/local/bin/mpic++: /usr/local/bin/mpic++: cannot execute binary file
When I use sudo I still get the same error. But when I first change to the bourne shell then run the mpic++ command it works.
/bin/sh
sh-3.2$ mpic++
clang: error: no input files
I've been looking at ways to change the shell used by eclipse so I can use the bash shell because I can call mpic++ without any problems. I've also tried launching eclipse with sudo but that didn't work.
I have compiled mpi in eclipse successfully. Please follow the steps:
In terminal type:
$ which mpicxx
/usr/local/bin/mpicxx
You should get the mpicxx binary path as result. I have my mpicxx in /usr/local/bin/ directory.
In eclipse, go to project properties:
Set GCC C Compiler as: /usr/local/bin/mpicxx
Also set GCC C+ Compiler as: /usr/local/bin/mpicxx
Set MacOS X C++ Linker as: /usr/local/bin/mpicxx. Also set All options as -L/usr/local/lib
I just installed protractor and the default repo along with webdriver. Every time I run protractor I get this error
module.js:340
throw err;
^
Error: Cannot find module '/usr/local/lib/node_modules/protractor/lib/cli.js'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:901:3
Not sure how to fix this... any clues?
Try to use the following solution :
under Configuration , use this for javascript file = /usr/lib/node_modules/protractor/lib/cli.js
I faced similar issue , it got resolved . I am using WebStorm in linux environment .
Make sure you installed protractor on the global position , by using this command :
sudo npm install -g protractor
sudo webdriver-manager update
webdriver-manager start
Got stuck similarly ... this worked for me.
Make sure to have "node_modules" & "node_modules/.bin" in the project folder, you can generate them by
running "npm install protractor" on the project root folder and then get rid of it "protractor" folder by running "npm uninstall protractor".