I am trying to run JavaScript code in Atom with Script package. It can run Python successfully, but with JS files it gives the following error message:
The system cannot find the file specified.
I had the same problem while analyzing some JavaScript code of an extension for Chrome.
Using: Windows 7 64Bit Atom:1.24.0 x64
Since I my coding Folder is somewhere else I copied the files in that folder. Let’s say:
C:\Users\USER\CodingStuff\
then it started working. I have also tried adding the extension file the Sources via:
1 - CTRL+SHIFT+I
2- Right click -> add folder to workspace
But that did not work.
Side note: node.js has to be installed on the system.
Hope it helps.
I know I am late, but if any other faces the same issue, my answer will be helpful.
Assumed that you want to run your javascript outside browser and you installed node.js.
There is a bug in "script" package of Atom. Check ur path of the script if there are spaces then this leads to the aforementioned error. Work around is remove spaces.
for ex:
E:\Java script\trial.js
change to:
E:\Javascript\trial.js
Related
So i just installed VScode on my Windows 10. I keep getting the following error:
"Can't find Node.js binary "node": path does not exist. Make sure Node.js is installed and in your PATH, or set the "runtimeExecutable" in your launch.json"
I've tried reinstalling VS and rebooting, tried installing from different folders (both on C drive and the second time i added it to my programs folder)
I tried installing a node.js extension which fails every time and then prompts me to try it manually...which then leads to a file downloading automatically, but when i add it to my VS folder through my file explorer, nothing happens still.
I tried installed a different node.js debugger
I tried changing my debugger to chrome too but all it does is take me to localhost:8080 and an empty page of course.
When i go through file explorer and look through the path of my .vscode folder, the nightly extension (node.js) is there....
I'm new to VScode and have just been using Scrimba's terminal to do my code but decided to try something more professional
I think you're putting node.js in the same folder/path as .vscode, this isn't correct. What you need to do is set node.js in your PATH which is different. See this answer for more information on how to set PATH/environment variables. Also install it from the official website nodejs.org. After changing your PATH remember to reboot.
I wouldn't recommend downloading "node.js extensions" as those likely are not legitimate, and as you've said yourself they don't work. Only download from the official website.
You have to install nodes from this website https://nodejs.org/
Would like to try this Rhino Debugger however having problems
I downloaded latest from here according to doc it says just simply run:
java org.mozilla.javascript.tools.debugger.Main [options] [filename.js] [script-arguments]
however..it's source code, so I probably need to build it first...(unless there are precompiled download out there?). Assuming I need to build it to get the jar file for debugger, I assume just build the build.gradle file at the root dir. Or run gradle tasks build ? When I do that I get error:
Execution failed for task ':checkstyleMain'.Unable to create a Checker: configLocation {C:\rhino\rhino-1.7.8\checkstyle.xml}, classpath {C:\rhino\rhino-1.7.8\buil
dGradle\classes\java\main;C:\rhino\rhino-1.7.8\buildGradle\resources\main}.
So..I'm a bit lost. Been ten years since I've worked with Java, but hopefully I'm missing something simple.
Any experienced Rhino JavaScript devs out there that can point me in the right direction? Should I just stick with using Eclipse? (Had that working, but I'm still curious about this debugger)
Download the latest rhino from the link you provided, at this time it is "rhino-1.7.8.zip". Unzip that and change directory to "rhino1.7.8/lib"; you need the "rhino-1.7.8.jar" in your CLASSPATH. Assuming you are in "rhino1.7.8/lib" that should be in your current folder, and you can then do
java -cp rhino-1.7.8.jar org.mozilla.javascript.tools.debugger.Main
Which should render like
I am trying to install JSLintMate http://rondevera.github.io/jslintmate/ for my text mate. Downloaded the bundle from their website and it suggested that it will get install automatically.
On unzipping it is asking for file encoding format and i am selecting default UTF-8
But after running the installation bundle I am getting an error
The bundle “JavaScript JSLintMate 1.4.tmbundle” does not contain the
required “info.plist” file (or that file is corrupt) and can therefore
not be installed.
I searched on the web regarding this but not able to find the solution.
Text-Mate Version: 1.5.11
OSX: Maverics 10.9
JSLintMate: 1.4
Is there anything wrong from my side or some additional step is required to make it work? Also please recommend me some alternatives since its not working.
Ok finally its working.The problem is with the unarchiver utility only. If I use default archiver utility instead,it's perfectly working fine https://github.com/rondevera/jslintmate/issues/30
I am not that good at computers but am trying to use JSDoc for one of my projects,
The tutorial to get it up and running is here
http://usejsdoc.org/about-jsdoc3.html
I have downloaded the program from github, but now do not understand what I have to do. I have a bunch of files in a folder and dont know how to get it actually running for my project.
Could someone please give me a step by step instruction on how to actually get JSDoc working, how do I set it up, how do I use it etc.
I know this may be mundane to some of you, but hey we all gotta start somewhere right?
Well, are you using windows or GNU/Linux?
First, you have to follow the default tags to markup your source code, identifying your classes, methods, parameters, etc...
After that, you download the file here: https://github.com/jsdoc3/jsdoc
Extract it and then go to folder jsdoc-master.
Inside it, you have a script called jsdoc (with no extension). Only you have to do is execute it pointing the whole path to your .js file you want to create a documentation like this: ./jsdoc your_class.js
Then, in a couple minutes you'll have the output inside the 'out' folder. Open the .html file and bang! You have your documentation working pretty good.
Right here you can find some common tags to use in your code (as comments): http://usejsdoc.org/
This solution is for Unix based system. But, there is another one using nodejs (that you can run with windows, Linux, mac, etc...). First, download the nodejs here: http://nodejs.org/
Then go to this website to take a look at the package jsdoc: https://npmjs.org/
Then, go back to your terminal (in any operating system after installed node) and type: npm install -g jsdoc
The option -g means globally, so you have inside the main folder of your node packages and they are available for whatever project you have and you don't need to install it again and again...
Finally, you can just use this command: jsdoc path/to/your/file.js
And that's it! I hope it helps you.
Once you've extracted the file you downloaded off of github, navigate within the folder and run in a terminal:
./jsdoc
with the options you want.
If you want to display the help menu
./jsdoc --help
If you want to install the program on your system, assuming a mac or linux machine, use root user or sudo:
npm install --save -g [~/Downloads/jsdoc-3.2.2 or your path to the downloaded extracted files]
I created a Test.js file and wrote two lines of JS code in it:
var a = 5;
console.log("The result is = " + a);
The output should be:
"The result is = 5"
Is there a way I can see this in Aptana Scripting console, instead of integrating the JS code in a HTML file and saving/refreshing it?
Can any other IDE, say Netbeans help, if not Aptana?
Any advise would be highly appreciated.
Regards
Roy
I think that it would be best if you give Node.js a try. This way, you get to call node test.js on a console window and see the result.
I'm pretty sure that console is meant for viewing the output of Aptana's Ruby-based commands (installed under the Commands menu). It might be possible to follow the instructions here: http://www.chromium.org/for-testers/enable-logging and then tail the resulting log file in a Terminal panel (not the same as a console window).
I'm afraid it is not possible.
But What I did was to setup a simple workbench.html file, where in the header I put
[...]
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script src="js/myJsFile.js"></script>
and then modified the myJsFile.js and saved it.
Another very intersting possibility is given by http://www.developer.nokia.com/Community/Wiki/Aptana_WRT_Plugin:_Displaying_log_messages_in_Output_console
just check it
It's not exactly what you asked, but it might point you in the right direction. There's a project called EclipseMonkey ... I'm not sure the status. Here's a working (?) example. Your mileage will vary. http://blogs.edgehill.ac.uk/webservices/2008/10/16/aptana-outline-auto-expansion-monkeyed/
What you can do is you can download node.js from node.js, download the package and follow the installation instructions on the screen.
If using a Windows, the node.js package comes with its own interactive command prompt which you can open. To run a js file on windows, open the windows command prompt, type in node, then the name of your file e.g. test.js. Node.js should run your file.
If using a Mac, the node.js package runs through the terminal application on the mac. To run a file, type in node, then the name of your file e.g. test.js, node.js should run the file.
Aptana Studio 3 has the ability to open the terminal inside the IDE itself. Save your file in Aptana Studio and follow the instructions to run a file on the mac.
By the way, keep your files labelled in lowercase letters, I tried using Uppercase for the first letter and it did not work.
Hope that helps.