Questions tagged [command-line]

A line of commands is a sequence of characters provided to an interpreter instructing it on specific actions to execute, like initiating programs or duplicating files. These command lines are processed by the interpreter using escape sequences and substitutions.

leveraging multiple arguments in npm scripts

I have a command line script specified in the package.json file. "entity:create": "./node_modules/.bin/ts-node ./node_modules/.bin/typeorm entity:create", Now, I am trying to pass two flags into this script - -n and -d. The desired execution format is li ...

Command Prompt displaying characters that are not supported

I'm having trouble using Composer because CMD is displaying unsupported characters and symbols. It seems that Composer is attempting to display colors in CMD. How do I stop Composer from showing colors so I can fix this issue? ...

Unable to execute a Windows command line that has been escaped within Python

When I execute the given command in a Windows command prompt, it works flawlessly. java -jar "C:\Program Files (x86)\SnapBackup\app\snapbackup.jar" main However, when I attempt to run the same command within a Python script, it fails. ...

I am looking for guidance on installing npm on Ubuntu in order to run less.js

After successfully installing node js in my Ubuntu 14.04, I encountered difficulties trying to install npm. My goal is to compile less through the command line which requires npm. Are there any alternative methods for compiling less or can someone guide m ...

The install command is not recognized by the NodeJS command line tool

Screenshot showing an error on my Node.js command line When attempting to update my Node.js, I encountered an issue where the command 'install' is not recognized as either an internal or external command. This problem arose while following installation in ...

Tips for creating a Node.js file that is accessible through the command line and can also be imported using the 'require()' function in other files

I am looking to create a Node.js source file called myCode.js that contains a function named foo(arg1, arg2,..). I want to be able to execute this function from the command line using: $ node ./myCode.js arg1 arg2 And also be able to use it in another fi ...

How come we have located the executable file?

After running the command npm install grunt -g, a folder is created at C:UsersmynameAppDataRoaming pm ode_modulesgrunt-cli. However, in my path variable, only the C:UsersmynameAppDataRoaming pm part is added. Despite this, when I type grunt i ...

Learn how to set up a personalized command to execute my npm package

Recently, I developed an npm package called chat in nodejs. As of now, it is not yet available on npm. The package consists of two main files - server.js and client.js. Previously, I used to execute node server.js and node client.js separately to run these ...

Is there a way to run a node script from any location in the command line similar to how Angular's "

Currently, I am developing a node module that performs certain functions. I want to create a command similar to Angular's ng command. However, I am facing compatibility issues with Windows and Linux operating systems. Despite my attempts to modify the node ...

unsuccessful transformation using TopoJSON

After successfully installing topojson using the command sudo npm install -g topojson, I encountered issues converting both a shapefile (.shp) and a geojson file to a topojson file. Alexanders-MacBook-Pro:topojson alexander$ geo2topo Parcel11_projected.ge ...

Create a custom Python graphical user interface that integrates a button for executing a command in the terminal

I currently have a project that involves two separate files. File number one handles eye-tracking and blinking calculations. This file runs whenever I input a command in the terminal using this line: python3 blink.py --shape-predictor shape_predictor_68_f ...

Adjusting the node and npm versions

Attempting to upgrade my npm but encountering issues. When entering npm -v An error is displayed: -bash: /usr/local/bin/npm: No such file or directory Trying with sudo returns: sudo: npm: command not found ...

Start the node server, send a curl request, and then shut down the server within the Dockerfile

My Dockerfile is quite simple: FROM node:16 COPY . . RUN npm install CMD ["npm", "run", "dev"] This Dockerfile runs a NextJS application. However, I am facing an issue where I need to make two CURL Requests from the container but using them in the CMD c ...

What is the most effective method for interacting with a Python script through the command line?

I regret if this is a replication, as my search query failed to yield the desired results. Typically, I terminate my python script by using its linux process ID. While this method has worked well for me thus far, I now find myself in need of pickling cer ...

Launching a NodeJS application through a C# web form application

I have developed a MeteorJS application that I am looking to run as a NodeJS application from within C# code. Here is a Windows Form application serving as a control panel for initiating and terminating the NodeJS application https://i.stack.imgur.com/2R ...

powershellUsing the cURL command with a PHP script

I am having trouble sending JSON data from the command line with curl to a php script and properly receiving it on the server-side. Here is what I have attempted so far: Running the following command in the command line: curl -H "Content-Type: applicati ...

Executing a Node.js program using the command line without having to type out the word 'node'

I am currently working on a Node.js package that includes a command-line utility. Right now, alacon.js is situated in the root of the package. To execute this utility, I have to use the word node followed by the utility's name, like so: node alacon 'SELE ...

Is it possible to test a Node CLI tool that is able to read from standard input with

I'm looking for a way to test and verify the different behaviors of stdin.isTTY in my Node CLI tool implementation. In my Node CLI tool, data can be passed either through the terminal or as command line arguments: cli.js #!/usr/bin/env node const ...

attempting to incorporate a custom dataset into TensorFlow using tfds results in errors

After following a tutorial on creating custom datasets for TensorFlow at this link, I attempted to create my own dataset using the `tfds` command. Upon entering the command `tfds new my_dataset`, I encountered the following error: tfds new my_dataset Trac ...

executing Windows Command Prompt commands through package.json scripts

When running commands in the command line (cmd), I have a specific sequence that I need to follow. The first command is 'npm run build' After that, I need to execute: 'xcopy C:\fileOne C:\fileTwo' However, I would like ...

In Ubuntu (using nvm), when attempting to install npm packages with `npm install`, you may encounter the need for `

I am a new developer and recently encountered a permissions issue after mistakenly installing sudo npm globally. With the help of someone, we used rm -Rf to remove all node files, node_modules, and npm files which fixed my original problem (not being able ...

Having trouble with the installation of react-textfit

I attempted to use npm npm i react-textfit in order to enhance my calculator application, however it is not functioning as expected. https://i.stack.imgur.com/XW8hN.png ...

Error: The node user directory does not exist, please check your command input

After foolishly running this script in an attempt to avoid using sudo for npm -g commands, my node_modules directory has now moved to: /Users/myusername/.npm-packages/lib/node_modules Now when trying to run commands like yo or bower, I encounter the error ...

Create a universal function for executing a script within a node package on a worldwide scale

I am currently developing an npm package and I would like to have it execute its own command. Assuming my package is called hello-world and it contains a script named start in the package.json file that runs: node index.js My goal is to be able to type ...

Attempting to deploy open-source software found on Github onto a server

When it comes to installing third party software on my website, I usually rely on widgets that require me to copy and paste the provided HTML code. However, there is a particular software from Github that I am interested in installing. The ReadMe file for ...

The PHP SDK function works flawlessly in the local host environment and in console, however, it fails to perform on the browser when deployed

My PHP function is behaving differently between the server's command line and the web page, with successful execution on a local WAMP host. Any thoughts on what could be causing this inconsistency? function getCFTemplateSummary($CFUrl){ //init client ...

Ways to enable GPG keys for PHP shell_exec操作

I have encountered an issue with a script I am developing which involves running a perl script via command line using the shell_exec() function. As part of setting up the script, I had to generate a GPG key on my end and import a public key into my GPG key ...

The word "yargs" will not activate a command within a script

I have a NodeJs script that requires parsing command line arguments. Here is the code I have written: import yargs from "yargs"; import { hideBin } from 'yargs/helpers'; //.... yargs(hideBin(process.argv)).command('--add-item ...

What is the process for using selenium-side-runner to run tests on Firefox browser?

After installing selenium-side-runner on Mac Mojave, I encountered an issue while attempting to execute a test from the command line using a recording from the IDE. The test file is named "myTest.side" and to address this, I created a corresponding "myTest ...

Can a script command be used to trigger a particular PHP function in a PHP file via a bash script?

The title of this question is pretty self-explanatory, but I'll provide some more details. There's a PHP file named hello-world.php and a bash script named testBash.sh in my setup. Inside hello-world.php, there are two methods: helloWorld() and ...

Guide on running CSSO command line CSS minifier in node.js

I have been attempting to utilize the CSSO command-line tool with node.js. Unfortunately, I am struggling to figure out how to simply call the csso command. You can find CSSO's documentation on this page: https://github.com/css/csso#33-from-the-command-l ...

What could be causing the Gruntfile to throw an error?

Getting an unexpected error while trying to run grunt $ grunt Loading "Gruntfile.js" tasks...ERROR >> SyntaxError: Unexpected token : Warning: Task "default" not found. Use --force to continue. Execution terminated due to warnings. Here is my ...

When running the file.js in Node, it generates a distinct outcome compared to when running it in a browser or using the

Check out this code snippet from test.js file: function foo(){ console.log(this.bar); } var bar = "bar1"; var obj = {bar: "bar2"}; foo(); foo.call(obj); After running 'node test.js', the output is: undefined ba ...

What command in PowerShell can be used to determine the version of chromedriver.exe?

While working on a PowerShell script to upgrade my webdrivers before running a selenium script, I encountered an issue. The command I was using to retrieve the version of msedgedriver.exe was successful, but when I tried the same command for chromedriver.e ...

Executing a Node Package Manager sub-script using command line arguments

I am working with some npm scripts that have the following structure: "scripts": { "exec:dev": "export NODE_ENV=development && npm run exec", "exec:stage": "export NODE_ENV=stage && npm run exec", "exec:prod": "export NODE_ENV= ...

Capturing the result of a MATLAB function in Python: A Comprehensive Guide

I have a piece of python code that calculates the mean of an array using the following script: def calculate_mean(array): p = os.popen('matlab -nodesktop -nosplash -r "mean('+str(array)+');exit"') while 1: line = p.readline() if n ...

NodeJS CLI Application Experiencing Issues with User Input Interpretation

Trying to collect user input from the command line in order to build a basic command line interface application. Leveraging the standard_input.on() function to capture and process the user input to determine appropriate responses on the command line. Encou ...

Unable to locate "Gruntfile.js" Node module for task execution

I am currently in the process of developing a module that enables node to execute Grunt tasks via the command line. This Node module is globally installed at : C:\Users\pcharpin\AppData\Roaming\npm\node_modules\task-app ...