"Error: Cannot find module 'webpack'" on preview #1721
Comments
How did you install wrangler? using npm or cargo? |
This happened both when I installed wrangler through |
do you have node_modules in |
Yes, and it contains a |
Running into the same issue using the cloudflare/wrangler-action (Wrangler
|
I have the same problem (with wrangler-action). It started today (at Wrangler 1.14.1). |
Same problem for me at 1.14.1, 1.14.0. Going back to version 1.13.0 works. |
Solved for me via changing to version GitHub Actions syntax here from @jasikpark cloudflare/wrangler-action#50 (comment) |
Hmmm...
|
I just noticed that that import isn't used anymorehttps://github.com/cloudflare/wrangler/blob/c6b61cd892b1ce191f337b61b3622b3e6ad192ff/wranglerjs/index.js#L4. Could you please send a PR to remove it? |
Interestingly |
So this is how I fixed it because nothing else worked (installing wrangler in local project, installing wrangler globally, etc).
This installed webpack because it's a dependency in the After that, |
Perhaps you need to give the path to your webpack config by setting: |
This issue has been automatically marked as stale because it has not had recent activity in the last 180 days. It will be closed if no further activity occurs in the next week. Please feel free to comment if you'd like it to remain open, and thank you for your contributions. |
This issue has been automatically closed because it has not had recent activity. You may re-open the issue if it is still relevant. |
🐛 Bug Report
I tried to follow this guide: https://developers.cloudflare.com/workers/platform/sites/start-from-scratch
Environment
rustc -V
: rustc 1.50.0-nightly (11c94a197 2020-12-21)node -v
: v10.23.0wrangler -V
: 👷 ✨ wrangler 1.12.3wrangler.toml
:Steps to reproduce
wrangler generate --site foo
cd foo
wrangler preview --watch
What did you expect to see?
A preview of the provided
index.html
What did you see instead?
The text was updated successfully, but these errors were encountered: