You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
we migrated our Rails-App to vitejs and everything seems to work nice in development.
Deploying it to production, it's yielding the following error: Uncaught TypeError: Failed to resolve module specifier "@hotwired/stimulus". Relative references must start with either "/", "./", or "../".
Looking at the precompiled source it seems that the path to node_modules is not beeing inserted:
/vite/assets/application-fxJWKlir.js
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hello there,
we migrated our Rails-App to vitejs and everything seems to work nice in development.
Deploying it to production, it's yielding the following error:
Uncaught TypeError: Failed to resolve module specifier "@hotwired/stimulus". Relative references must start with either "/", "./", or "../".Looking at the precompiled source it seems that the path to node_modules is not beeing inserted:
/vite/assets/application-fxJWKlir.js
Do i have to add node_modules to vite config?
In https://vite-ruby.netlify.app/guide/deployment.html#disabling-node-modules-installation-in-assets-precompile it says that node_modules will be auto-installed by
assets:precompile..package.json
Thank you for any hint!
Best wishes, T.
Beta Was this translation helpful? Give feedback.
All reactions