Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

_pkg__WEBPACK_IMPORTED_MODULE_0__.AniSS is not a constructor #1

Open
fe80Grau opened this issue Jan 5, 2022 · 9 comments
Open

_pkg__WEBPACK_IMPORTED_MODULE_0__.AniSS is not a constructor #1

fe80Grau opened this issue Jan 5, 2022 · 9 comments

Comments

@fe80Grau
Copy link

fe80Grau commented Jan 5, 2022

When i compile project and open index.html generated over dist folder i recive this error
`init.js:54

Uncaught (in promise) TypeError: _pkg__WEBPACK_IMPORTED_MODULE_0__.AniSS is not a constructor
at startup (init.js:54)
at eval (init.js:65)
at Object../www/js/init.js (www_js_init_js.bundle.js:28)
at Function.__webpack_require__ (bundle.js:29)`

(i tried with npm run build , npm run serve, npx webpack)

@pinnouse
Copy link
Owner

pinnouse commented Jan 5, 2022

I've just updated dependencies and tried a build myself. It works fine for me. Make sure you're in the root of the project folder. Dependencies were installed via yarn

You should only need to run (in this order):

> npm run build
> npm run serve

@fe80Grau
Copy link
Author

fe80Grau commented Jan 6, 2022

I've just updated dependencies and tried a build myself. It works fine for me. Make sure you're in the root of the project folder. Dependencies were installed via yarn

You should only need to run (in this order):

> npm run build
> npm run serve

Thank you pinnouse, i tried again but i get the same error,
image

I'm working over windows 10. Today i will try again with a Linux system and i will show you the results.

Edit: I tried with Windows Subsystem for Linux and i get the same error. If i compare your js generated in gh-pages branch i can see that // "./pkg/index_bg.js": and // "./pkg/index_bg.wasm": sections are not created

**It's rare that index.js generated in pkg folder was 0 bytes.

@pinnouse
Copy link
Owner

pinnouse commented Jan 6, 2022

Strangely, it seems that when building the webpack, whatever's happening on your end is not building the webassembly. Do you have wasm-pack? I believe you can build it with the command
wasm-pack build --target web --release

@fe80Grau
Copy link
Author

fe80Grau commented Jan 6, 2022

oh!! yes i needed wasm-pack. (https://rustup.rs/ and https://rustwasm.github.io/wasm-pack/installer/)
But now more i get more errors.

image

I tried to select file and you can see that fucntion onelectfile is not working
Again i tried this in windows 10 and WSL

@pinnouse
Copy link
Owner

pinnouse commented Jan 8, 2022

Have you made any changes to the webpack file? I don't really know why your environment wouldn't work if it's able to serve on both my machine and github build. Based off the error, it feels like somehow it wasn't able to load www/js/init.js file in the bundle

@Tama47
Copy link

Tama47 commented Mar 27, 2023

you can see that fucntion onelectfile is not working

I'm experiencing the same problem.
Screenshot 2023-03-26 at 6 45 30 PM

it's able to serve on both my machine and github build.

How did you set up the github build?

@pinnouse
Copy link
Owner

I can't seem to replicate this error myself

from the root folder ./ani-ss/ I'm just running yarn install and then yarn serve and it should be accessible at http://localhost:8080

@Tama47
Copy link

Tama47 commented May 5, 2023

Thanks! I was able to set it up and running correctly. However, I'm not sure which shaders to use. I tried v3 shaders and it's giving me errors, while v4 loads fine but it doesn't actually do anything to improve the video.

@pinnouse
Copy link
Owner

pinnouse commented May 7, 2023

The problem is that the syntax/naming has changed a little bit for how Anime4K refers to the textures, so I think the parsing will have to be updated to support the updated naming

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants