Code Monkey home page Code Monkey logo

Comments (11)

jpikl avatar jpikl commented on May 27, 2024

Hi. You will have to explain in more detail how did you run the examples and exactly what error it gave you.

The easiest way to run the examples is to put the HTML files together with cfxnes.js into one directory and serve them as static web pages using an HTTP server. For that i would recommend the http-server npm package. Just install it using npm -g i http-server, then run it with http-server command, the open http://127.0.0.1:8080 in your browser.

from cfxnes.

AdriaSaz avatar AdriaSaz commented on May 27, 2024

I can´t run this without http-server npm? in a normal webserver apache or xampp?

ok thanks

from cfxnes.

jpikl avatar jpikl commented on May 27, 2024

You can use whathever http server you want. That was just an example.

from cfxnes.

AdriaSaz avatar AdriaSaz commented on May 27, 2024

Then I put the html of the example together to cfxnes.js only those 2 files? and the rom of course

I Try

from cfxnes.

AdriaSaz avatar AdriaSaz commented on May 27, 2024

I put in the same folder:
Folders

Audio
Input
Properties
rom
system
video

Files
.eslintrc.js
cfxnes.js
index.html(minimal example file)
mario.nes ( rom)

Only load page they has a js error :

Uncaught SyntaxError: Unexpected token { (index):10
Uncaught TypeError: cfxnes is not a function at (index):10

I'm use xampp with php 5. but this emulator it's full js, no?

from cfxnes.

AdriaSaz avatar AdriaSaz commented on May 27, 2024

the same problem with advanced example file

from cfxnes.

jpikl avatar jpikl commented on May 27, 2024

I see the problem now.

You are using the original source code, not the built library.
Run npm run build in lib directory. The cfxnes.js you should be using is in the dist directory.

from cfxnes.

AdriaSaz avatar AdriaSaz commented on May 27, 2024

I'm sorry or I'm very noob or I don't understand this

1- Install node.js on windows
1open the nodejs command console
3- I went to the lib directory
4 I did an npm install, dependencies were installed
5- When doing npm run build tell me this, do I need java in the directory?

[email protected] build C:\Users\bitman\Downloads\cfxnes-master\cfxnes-master\lib
node build.js

java -jar C:\Users\bitman\Downloads\cfxnes-master\cfxnes-master\lib\node_modules\google-closure-compiler\compiler.jar --compilation_level=ADVANCED --language_in=ECMASCRIPT6_STRICT --language_out=ECMASCRIPT5_STRICT --create_source_map=%outname%.map --source_map_location_mapping=../core|../../core --source_map_location_mapping=src|../src --module_resolution=NODE --dependency_mode=STRICT --rewrite_polyfills=false --output_wrapper_file=umd.template --assume_function_wrapper=true --formatting=SINGLE_QUOTES --externs=externs.js --entry_point=src/cfxnes --js=..\core\src**js --js=..\core\index.js --js=src**js --js=!..\core\src.eslintrc.js --js=!src.eslintrc.js --js_output_file=dist\cfxnes.js

Process spawn error. Is java in the path?
spawn java ENOENT

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: node build.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build 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\bitman\AppData\Roaming\npm-cache_logs\2019-08-23T20_35_21_352Z-debug.log
2019-08-23T20_35_21_352Z-debug.log

from cfxnes.

AdriaSaz avatar AdriaSaz commented on May 27, 2024

don't have a tutorial for noobs?? hehe or a emulator builded download

from cfxnes.

jpikl avatar jpikl commented on May 27, 2024

Yes, I am using closure compiler which requires Java.

I've just realized that there is a much easier way. Just download the latest release which contains lib/cfxnes.js you need.

from cfxnes.

AdriaSaz avatar AdriaSaz commented on May 27, 2024

Thanx Works perfectly

from cfxnes.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.