alexa-samples / skill-sample-nodejs-adventure-game

This tool provides an easy to use front-end that allows developers to instantly deploy code for your story, or use the generated code as a starting point for more complex projects.
Apache License 2.0
510 stars 218 forks source link

npm start issue in Windows Machine #54

Open Veiam opened 6 years ago

Veiam commented 6 years ago

This is the error log I get when I do npm start

C:\Users\skyip\Documents\GitHub\interactive-adventure-game-tool\interactive-adventure-game-tool>npm start

interactive-adventure-game-tool@1.0.0 start C:\Users\skyip\Documents\GitHub\interactive-adventure-game-tool\interactive-adventure-game-tool node node_modules/gulp/bin/gulp.js

C:\Users\skyip\Documents\GitHub\interactive-adventure-game-tool\interactive-adventure-game-tool\node_modules\require-dir\index.js:97 if (!require.extensions.hasOwnProperty(ext)) { ^

TypeError: require.extensions.hasOwnProperty is not a function at requireDir (C:\Users\skyip\Documents\GitHub\interactive-adventure-game-tool\interactive-adventure-game-tool\node_modules\require-dir\index.js:97:37) at Object. (C:\Users\skyip\Documents\GitHub\interactive-adventure-game-tool\interactive-adventure-game-tool\gulpfile.js:1:85) at Module._compile (module.js:635:30) at Object.Module._extensions..js (module.js:646:10) at Module.load (module.js:554:32) at tryModuleLoad (module.js:497:12) at Function.Module._load (module.js:489:3) at Module.require (module.js:579:17) at require (internal/module.js:11:18) at Liftoff.handleArguments (C:\Users\skyip\Documents\GitHub\interactive-adventure-game-tool\interactive-adventure-game-tool\node_modules\gulp\bin\gulp.js:116:3) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! interactive-adventure-game-tool@1.0.0 start: node node_modules/gulp/bin/gulp.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the interactive-adventure-game-tool@1.0.0 start script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\skyip\AppData\Roaming\npm-cache_logs\2017-11-15T23_44_58_976Z-debug.log

Any help will be appreciated.

Also this is what I get after I do npm install

npm notice created a lockfile as package-lock.json. You should commit this file. npm WARN interactive-adventure-game-tool@1.0.0 No repository field. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.3 (node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

Web-Cam commented 6 years ago

I created a pull request with windows instructions, but here they are.

Step 1 : Create a file in your home directory (usually your name) named .aws
In order to do this on windows, simply crate a new folder with the name .aws.
Step 2 : Create a file in that folder with the name credentials.file using notepad
Inside include this code
[default]
aws_access_key_id = [KEY FROM AWS]
aws_secret_access_key = [SECRET KEY FROM AWS]

    Replacing those codes with the ones found in AWS console This you get by logging into 
IAM (http://docs.aws.amazon.com/general/latest/gr/aws-sec-cred-types.html)

step 3:  Install node from https://nodejs.org/en/
step 4:Install NPM from https://www.npmjs.com/
step 5 : Install git https://git-scm.com/downloads

Step 6: Run git clone https://github.com/alexa/interactive-adventure-game-tool.git in command prompt
Step 7: CD to that drive it will be in C:\Users\NAME\interactive-adventure-game-tool replacing name with your home directory name

so CD C:\Users\name\interactive-adventure-game-tool in command prompt.

Step 8 : Type npm install and wait, it will take a while
Step 9 : Npm Start and then allow, it should open.

Hope this helps! i saw this guide and couldn't believe they only made it for macs and nobody posted windows instructions!

schwarma23 commented 6 years ago

Hi - I needed to edit the package.json in the "interactive-adventure-game-tool" folder to bump the version of require-dir from 0.2.0 to 0.3.2. You cannot just edit the file with an editor else the install will fail. I used www.jsoneditoronline.org and re-saved the edited version. Look for line 38 ("require-dir": "^0.2.0",) and change it 0.3.2. That got me past your error but then I still had a Python error (installed Python 2.7.X) after that and an MS Framework 4.0 (my computer) vs 2.0 (code) after that (which I haven't yet resolved).

I hope this helps!

AlexanderGorny commented 6 years ago

I have had a problem with python and just installed python 2.7 from here https://www.python.org/downloads/release/python-2714/ and it finally worked...but the fonts doesnt seem to fit, so it looks a little bit different from running on the mac