beefy command not found - javascript

I am new to node.js and trying to follow this tutorial. I am getting an error on the last command beefy game.js:bundle.js --live. It says sh.exe": beefy: command not found
The beefy package version I am using is 2.1.1
Tried to Google this problem but couldn't find a solution.

I have not followed the tutorial in detail, but the response form the console means that the the console command or program called beefy is not installed. The first word of your input into the console will be interpreted to be a command (a little program) that will run.
For instance cd is a program to change directory and the next thing you enter will specify a directory to which to change.
beefy is not a command/console program that is in your system. (It is not a standard command.) Probably somewhere else in the tutorial you were instructed to install it in one of your various bin/ directories (where shell program commands are stored.)
EDIT:
TL;DR
The fix: install beefy globally (on your machine not for directory only) using npm:
npm install beefy --global

Related

NPM START ERROR - This is related to npm not being able to find a file

I have a problem with npm, but specifically when starting my project for a simple server using node.js.
hello network
I have a problem with npm, but specifically when starting my project for a simple server using node.js.
I tried to search in forums, videos and articles but the solutions didn't answer me.
The ERROR says that the package.json file is not in the directory, but it is - and the file contains "start" directing to the nodemon app.js command.
My directory
Error npm
Thank you very much
The error says that cmd.exe; is not found (and not, as you claim, package.json). Note the extra ; at the end which shouldn't be there.
Make sure your system's COMSPEC environment variable doesn't have this spurious semicolon at the end (if it has, remove it and restart your computer) and also that you don't have any .npmrc that overrides the shell with the bad path.

How to Run JavaScript file with node.js on windows (scribbletune)

Is it possible to run a JavaScript file with node.js on windows? I have been trying to for hours and can't find any more solutions on the internet that work.
I have a js-file that uses scribbletune which only works with node.js.
I have node.js installed and I installed gitbash because it was recommended in a forum.
I tried to run from command prompt and gitbash but nothing seems to happen.
What am I doing wrong? Any help would be very much appreciated.
There is no need to install gitbash to use Node on Windows. It's a handy thing to have if you're used to a *nix environment. If you're not, it just gives you something more to learn, which isn't helpful if you're already in the middle of trying to learn Node.
Just:
Get the Windows installer from https://nodejs.org/en/download/
Run the Windows installer
Create a directory for your project
Open a Command Prompt Window to get a command line
Switch to your project directory
(Optional, but a good idea) Use npm init to create a package.json file (it'll walk you through it)
Install any libs you're going to be using via npm (for instance, npm install scribbletune from your command prompt window)
Put your JavaScript files in that directory
Use node main.js at the command line to run your main file (whatever it's called; main.js is just a placeholder)
Inorder to run a js (java script file) file
step 1. u need to go to the file location where u want to run.
step 2. just use "shift +right click".
u will see a pop-up and go to powershell or cmd.
step 3. type "node FILENAME.js"
final step: you will see the result ^.^

JavaScript Program Path Not Specified Error

I've been creating a JavaScript game for a project recently and have done it completely on the CodePen website. I now am trying to transfer it to WebStorm to turn it into a basic website. However when I try to run my code I get the following error:
I don't know how to fix it, I've looked everywhere and haven't been able to get some help. Any information would be appreciated.
Simple one, basically the error says, I don't know how to interpret this bit of code that you just gave me. You're missing local install of Node.js and NPM. Get the latest versions of these 2, and then go to File -> Settings -> Language&Frameworks -> Node.js and NPM and in the Node interpreter text box, point it to the path of where node.js was installed.
You're running this JavaScript file with Node.js that is probably not installed on your machine. It seems that you want to run and debug your app in the browser instead. For that you need to create a JavaScript run/debug configuration instead as described here: https://www.jetbrains.com/help/webstorm/debugging-javascript-in-chrome.html
On a linux machnie,
Install nodejs and npm
sudo apt-get install nodejs
sudo apt-get install npm
Get the nodejs installation folder
whereis nodejs
Should print something like:
/usr/bin/nodejs /usr/lib/nodejs /usr/include/nodejs /usr/share/nodejs /usr/share/man/man1/nodejs.1.gz
Go to:
Webstorm-> File -> Languages & Frameworks -> Node interpreter
Copy paste the installation folder to the text box.
Mac OS here. Solved the issue with:
$ brew install nodejs

Using CasperJS within a regular JavaScript file

I am trying to create a NodeJS program that utilizes CasperJS within it. I have run into the error that the module 'casper' cannot be found. As a result, I have tried to npm install spooky --save as I have read around that it is a driver, but I am still getting the same error as I was getting before.
Also, before trying to install SpookyJS, I tried
var phantom = require('phantom');
phantom.casperPath = '/path/to/casperjs';
phantom.injectJs(phantom.casperPath + '/bin/bootstrap.js');
Which then gave me the error that injectJs is not a function. Any and all help appreciated.
First of all, to contextualize a bit, here is an important reminder for everyone:
While CasperJS is installable via npm, it is not a NodeJS module and will not work with NodeJS out of the box. You cannot load casper by using require(‘casperjs’) in node. Note that CasperJS is not capable of using a vast majority of NodeJS modules out there. Experiment and use your best judgement.
This is where SpookyJS comes into play... But how to make it work? (I assume you are on Linux.)
1. Make sure you have the right environment
Node.js >= 0.8
PhantomJS >= 1.9
CasperJS >= 1.0
Note: SpookyJS works on my computer (Arch Linux) and I have the following setup:
node --version ---> v7.7.4
npm --version ---> 4.4.4
phantomjs --version ---> 2.1.1
casperjs --version ---> 1.1.3
PhantomJS and CasperJS are installed globally.
2. Install SpookyJS locally (and its dependency: tiny-jsonrpc)
Create an empty directory and run npm i spooky tiny-jsonrpc inside. We do not need a package.json here, so you can forget about --save or --save-dev.
3. Test the given example
If SpookyJS is installed, you should have a local node_modules directory. Now, try to run the following command:
node node_modules/spooky/examples/hello.js
If you get "Hello, from Spooky the Tuff Little Ghost - Wikipedia", congrats! You can now integrate SpookyJS in your project, but you will have to respect the syntax presented in hello.js...
you can't include js files to phantom. you need to open a page and then you can includejs into it. page will accept js files. not phantom.
Please refer this
includeJs(url, callback) {void}
Includes external script from the specified url (usually a remote
location) on the page and executes the callback upon completion.

run streamline.js gives error "The system cannot find the path specified"

I ran npm install streamline -g as it specifies in the github doc
However, when I ran _node on windows command line....I got:
The system cannot find the path specified.
I checked my AppData\Roaming\npm (where node modules are installed, and I verified that this path is indeed in my environment variables), I can see that _node.cmd just lies there along with bower, but I have no problem invoking bower from windows command line
I think windows knows that I have "_node.cmd", since before the installation, the error message I am getting is:
'_node' is not recognized as an internal or external command
So I suspect that the underscore somehow broke windows command line, anyone knows how to fix this issue?

Categories