Rollup failed to resolve import "@inertiajs/inertia-vue3"
dietcheese opened this issue · 10 comments
Describe the bug
Error when doing npm run build
[vite]: Rollup failed to resolve import "@inertiajs/inertia-vue3" from "/shared/httpd/domain/laravel-project/resources/js/Pages/Auth/Login.vue".
This is most likely unintended because it can break your application at runtime.
If you do want to externalize this module explicitly add it to
build.rollupOptions.external
at onRollupWarning (file:///shared/httpd/domain/laravel-project/node_modules/vite/dist/node/chunks/dep-5e7f419b.js:44636:19)
at onwarn (file:///shared/httpd/domain/laravel-project/node_modules/vite/dist/node/chunks/dep-5e7f419b.js:44407:13)
at Object.onwarn (file:///shared/httpd/domain/laravel-project/node_modules/rollup/dist/es/shared/rollup.js:24457:13)
at ModuleLoader.handleInvalidResolvedId (file:///shared/httpd/domain/laravel-project/node_modules/rollup/dist/es/shared/rollup.js:23139:26)
at file:///shared/httpd/domain/laravel-project/node_modules/rollup/dist/es/shared/rollup.js:23099:26
To Reproduce
Fresh installation of socialstream after installing Jetstream. Also tried from fresh Laravel install.
php artisan socialstream:install --stack=inertia
Environment context
"php": "^8.0.2",
"inertiajs/inertia-laravel": "^0.6.8",
"joelbutcher/socialstream": "^3.8",
"laravel/framework": "^9.19",
"laravel/jetstream": "^2.16",
Running on Devilbox/Windows
Best way to fix without changing every component?
Downgrading Jetstream didn't correct the issue.
I manually changed my imports to '@inertiajs/vue3' in the 5 files that required the change and was able to build.
However, I'm now getting javascript errors in /build/assets/Socialstream-50728317.js.
I've added the Github provider but no icon appears.
@dietcheese please see #236 and give that a test over
From https://github.com/joelbutcher/socialstream
- branch refs/pull/236/head -> FETCH_HEAD
Updating ae127af..08881a0
Fast-forward
composer.json | 2 +-
src/Console/InstallCommand.php | 73 +++++++++++++++++++++++++------------------------------------------------
stubs/inertia/resources/js/Components/Socialstream.vue | 2 +-
stubs/inertia/resources/js/Pages/Auth/Login.vue | 2 +-
stubs/inertia/resources/js/Pages/Auth/Register.vue | 2 +-
stubs/inertia/resources/js/Pages/Profile/ConnectedAccountsForm.vue | 2 +-
stubs/inertia/resources/js/Pages/Profile/SetPasswordForm.vue | 2 +-
7 files changed, 31 insertions(+), 54 deletions(-)
Applied updates and was able to build, however even after enabling and configuring Github provider, I'm not seeing the icon being displayed.
FYI, tried a fresh Laravel install, required this branch in composer.json:
"joelbutcher/socialstream": "dev-fix-inertia-vue-3",
php artisan socialstream:install --stack=inertia
succeeded without any errors:
Tables migrated fine.
npm run build
worked fine.
However, I'm still not seeing the Github provider on the login or registration pages after:
- enabling provider in socialstream.php (config)
- adding github to services.php and
- adding ID and SECRET to .env.
Am I missing something?
@dietcheese I've found the bug.
Please update Socialstream.Vue
and replace props.value.errors
with props.errors
on line 13. Rebuild and try again. I'll commit this bug fix up with the branch