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

Problems at 'Hello World' step npm issues, willing to work through! #311

Open
FreekyFrank opened this issue Mar 7, 2024 · 2 comments
Open

Comments

@FreekyFrank
Copy link

Running npm install produces:
41 vulnerabilities (1 low, 6 moderate, 29 high, 5 critical)
Running npm audit fix produces:
8 vulnerabilities (1 low, 7 high)
Now am faced with a situation which will produce breaking changes!!
As a developer who is an npm and wasm novice this looks like a potentially big climb when I am not even sure the previous steps are correct.
I am willing and able to work through this or step back and start again but I think I need some help. Judging by other issues raised so do others!
$ npm ls
create-wasm-app@0.1.0 ~/code/wasm-rust/rust-and-webassembly-book/wasm-game-of-life/www
├── copy-webpack-plugin@5.1.2
├── hello-wasm-pack@0.1.0
├── webpack-cli@3.3.12
├── webpack-dev-server@3.11.3
└── webpack@4.43.0
$ npm ls -g
~/.nvm/versions/node/v20.11.1/lib
├── browserify@17.0.0
├── corepack@0.23.0
└── npm@10.5.0

@abdounasser202
Copy link

abdounasser202 commented Mar 30, 2024

I had the same issue and I found answers here #295

  1. Your devDependencies should be as follows
"devDependencies": {
    "@webpack-cli/serve": "^2.0.5",
    "copy-webpack-plugin": "^11.0.0",
    "hello-wasm-pack": "^0.1.0",
    "webpack": "^5.88.0",
    "webpack-cli": "^5.1.4",
    "webpack-dev-server": "^4.15.1"
  }
  1. then you need to replace plugins as follows in webpack.config.js

plugins: [new CopyWebpackPlugin({ patterns: ["index.html"] })],

And also this add this experiments: { asyncWebAssembly: true },

More other infos are here : rustwasm/create-wasm-app#206

@ptdecker
Copy link

I had the same problem and @abdounasser202 's input addressed it

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