RPG-Paper-Maker / RPG-Paper-Maker

RPG Paper Maker is a game making engine, free for non commercial use, allowing you to create a 3D universe with many 2D sprites and even 3D objects using a simple interface for all available platforms: Windows, Linux, and MacOS.
http://rpg-paper-maker.com
Other
612 stars 67 forks source link

web version not running too #112

Open j2l opened 8 months ago

j2l commented 8 months ago
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: react-scripts@5.0.1
npm ERR! Found: typescript@5.3.3
npm ERR! node_modules/typescript
npm ERR!   typescript@"^5.3.3" from the root project
npm ERR!   peer typescript@">= 2.7" from fork-ts-checker-webpack-plugin@6.5.3
npm ERR!   node_modules/fork-ts-checker-webpack-plugin
npm ERR!     fork-ts-checker-webpack-plugin@"^6.5.0" from react-dev-utils@12.0.1
npm ERR!     node_modules/react-dev-utils
npm ERR!       react-dev-utils@"^12.0.1" from react-scripts@5.0.1
npm ERR!       node_modules/react-scripts
npm ERR!         react-scripts@"^5.0.1" from the root project
npm ERR!   1 more (tsutils)
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peerOptional typescript@"^3.2.1 || ^4" from react-scripts@5.0.1
npm ERR! node_modules/react-scripts
npm ERR!   react-scripts@"^5.0.1" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: typescript@4.9.5
npm ERR! node_modules/typescript
npm ERR!   peerOptional typescript@"^3.2.1 || ^4" from react-scripts@5.0.1
npm ERR!   node_modules/react-scripts
npm ERR!     react-scripts@"^5.0.1" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict,
Wano-k commented 8 months ago

Strange, I will test in another computer.

j2l commented 8 months ago

Thank you @Wano-k I really appreciate you reply quickly. Here are other issues related to the node version:

npm run update-mods

> RPG Paper Maker@0.1.0 update-mods
> node scripts/update-mods.mjs

Error during download: [Error: ENOENT: no such file or directory, lstat './mods'] {
  errno: -2,
  code: 'ENOENT',
  syscall: 'lstat',
  path: './mods'

indeed, there's no script/mods, it's in .gitignore

I also tried to build it and got a dependency error:

npm run build

> RPG Paper Maker@0.1.0 build
> react-scripts build

Creating an optimized production build...
Compiled with warnings.

[eslint] 
src/editor/components/InputText.tsx
  Line 34:5:  React Hook useEffect has a missing dependency: 'setFocustFirst'. Either include it or remove the dependency array. If 'setFocustFirst' changes too often, find the parent component that defines it and wrap that definition in useCallback  react-hooks/exhaustive-deps

src/editor/components/Tree.tsx
  Line 50:9:  'forceUpdate' is assigned a value but never used  @typescript-eslint/no-unused-vars

src/editor/components/TreeItem.tsx
  Line 50:5:  React Hook useEffect has a missing dependency: 'node'. Either include it or remove the dependency array  react-hooks/exhaustive-deps

src/editor/hooks/useStateNumber.tsx
  Line 12:8:  'React' is defined but never used  @typescript-eslint/no-unused-vars

src/editor/hooks/useStateString.tsx
  Line 12:8:  'React' is defined but never used  @typescript-eslint/no-unused-vars

Search for the keywords to learn more about each warning.
To ignore, add // eslint-disable-next-line to the line before.

File sizes after gzip:

  319.8 kB  build/static/js/main.19f8aef6.js
  3.23 kB   build/static/css/main.b46e8f7c.css

The project was built assuming it is hosted at ./.
You can control this with the homepage field in your package.json.

The build folder is ready to be deployed.

Find out more about deployment here:

  https://cra.link/deployment

after forcing install, and building, I've got: [2024-03-13T13:30:29.431Z] "GET /Scripts/Shaders/default.vert" Error (404): "Not found" so not running.

Maybe .gitignore again? :smile_cat:

and there are 3 moderate severity vulnerabilities at npm install

(désolé pour le ticket combo)

Wano-k commented 8 months ago

Hello, sorry for late action, I was pretty busy on other projects!

I updated packages. There are still vunerabilities issues at npm install but there are always ones when updating versions so for now I'm just ignoring if it's not critical...

npm run update-mods should be working now. Just a stupid missing await condition.

After that just do npm start. npm run build is supposed to be for me when actually deploying the game on website or for electron.

Modifications done here: 293aa0c7d387fc010456e2870fcaaa2f53956d6a

j2l commented 8 months ago

Thank you @Wano-k

Got one high vulnerability at install. After npm audit --force, I got: 122 vulnerabilities (1 low, 100 moderate, 17 high, 4 critical) Redoing the audit --force fixed most, with lots of changes: added 408 packages, removed 957 packages, changed 339 packages, and audited 1853 packages in 32s

At npm start, it starts but doesn't draw any tile and in the console:

THREE.WebGLProgram: Shader Error 0 - VALIDATE_STATUS false

Material Name: 
Material Type: MeshPhongMaterial

Program Info Log: Must have a compiled vertex shader attached:
SHADER_INFO_LOG:
ERROR: 0:90: '<' : syntax error
VERTEX

ERROR: 0:90: '<' : syntax error

  85: #ifdef USE_SKINNING
  86:   attribute vec4 skinIndex;
  87:   attribute vec4 skinWeight;
  88: #endif
  89: 
> 90: <!DOCTYPE html>
  91: <html lang="en">
  92:   <head>
  93:       <meta charset="utf-8" />
  94:       <link rel="icon" href="favicon.ico" />
  95:       <link rel="stylesheet" href="./style.css" />
  96:       <meta name="viewport" content="width=device-width, initial-scale=1" />
FRAGMENT

ERROR: 0:75: '<' : syntax error

  70: vec4 LinearTosRGB( in vec4 value ) {
  71:   return sRGBTransferOETF( value );
  72: }
  73: vec4 linearToOutputTexel( vec4 value ) { return ( sRGBTransferOETF( value ) ); }
  74: 
> 75: <!DOCTYPE html>
  76: <html lang="en">
  77:   <head>
  78:       <meta charset="utf-8" />
  79:       <link rel="icon" href="favicon.ico" />
  80:       <link rel="stylesheet" href="./style.css" />
  81:       <meta name="viewport" content="width=device-width, initial-scale=1" />
Wano-k commented 8 months ago

I just checked and noticed that the git cloning in update-mods script is not fetching from 3.0.0 branch for game scripts. It looks like you cloned Game-Scripts-Build manually? Because you should have got an error if you didn't. Make sure to be in 3.0.0 branch for this repo and do npm run update-mods again.