I'm a plete noob at programming but yeah. Like the title said, I don't know how to run an app.js in node (/). Installing npm install async
and npm install spotify-node-applescript
was easy but I don't know how to run the app.js file. If I try to run it in the node.js mand prompt it gives me this error when I use node.exe it just keeps loading. Can someone help me?
Line 1. Char 1. Object expected. Error 800A138F
Thanks!
I'm a plete noob at programming but yeah. Like the title said, I don't know how to run an app.js in node (https://github./paterson/SpotifyHack/). Installing npm install async
and npm install spotify-node-applescript
was easy but I don't know how to run the app.js file. If I try to run it in the node.js mand prompt it gives me this error when I use node.exe it just keeps loading. Can someone help me?
Line 1. Char 1. Object expected. Error 800A138F
Thanks!
Share Improve this question edited Oct 1, 2013 at 17:07 Juan Cortés 21.1k8 gold badges69 silver badges91 bronze badges asked Oct 1, 2013 at 17:05 Tom046Tom046 331 silver badge4 bronze badges2 Answers
Reset to default 6It looks like you're double-clicking app.js on Windows, which by default will launch the file with Windows Script Host, which is Microsoft's JavaScript runtime. It throws an error because it is very unlike node (specifically, WSH doesn't have a require
).
With node (once it is installed), you have to open a mand prompt and run it there.
C:\SomeNodeApp> node app.js
Your next problem is that the project you're trying to run (SpotifyHack) uses AppleScript, which is specific to Mac OS. You won't be able to use this project on Windows.
From your CLI (Command Line Interface), try node app
when you're in the directory with app.js.