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

Tests fail on 2nd try #594

Open
rameziophobia opened this issue Jul 1, 2024 · 0 comments
Open

Tests fail on 2nd try #594

rameziophobia opened this issue Jul 1, 2024 · 0 comments

Comments

@rameziophobia
Copy link
Contributor

rameziophobia commented Jul 1, 2024

When you run bundle exec rake the first time to run the tests it works well. After it finishes, if you try to run it a 2nd time an error is shown

Puma caught this error: Shakapacker can't find client-bundle.css in /Users/ramezweissa/code/shaka/react-webpack-rails-tutorial/public/packs/manifest.json. Possible causes:

  1. You forgot to install javascript packages or are running an incompatible javascript runtime version
  2. Your app has code with a non-standard extension (like a .jsx file) but the extension is not in the extensions config in config/shakapacker.yml
  3. You have set compile: false (see config/shakapacker.yml) for this environment
    (unless you are using the bin/shakapacker -w or the bin/shakapacker-dev-server, in which case maybe you aren't running the dev server in the background?)
  4. webpack has not yet FINISHED running to reflect updates.
  5. You have misconfigured Shakapacker's config/shakapacker.yml file.
  6. Your webpack configuration is not creating a manifest.

Full error is in tempError.txt, it contains the manifest generated on the 2nd pass
tempError.txt

This is the manifest which is generated on the 1st pass (which includes client-bundle.css):
1stPassManifest.json

One workaround to be able to run the tests again is to do any edit to commonWebpackConfig.js, for example add ".x" to the extensions.

const commonOptions = {
  resolve: {
    extensions: ['.css', '.ts', '.tsx', '.x'],
  },
};

After this, you can run the tests one time before they fail again

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

1 participant