socialstream not working with new install of laravel[bug]
CamKem opened this issue · comments
Describe the bug
When installing a new install of laravel & socialsteam, when running npm run dev during the installation (php artisan socialstream:install --stack=inertia --teams) & also to run the vite server (npm run dev), it fails and gives an error "unable to resolve inertia. I love socialstream and have a new app I am designing and really want to use it. Can you please help.
To Reproduce
Steps to reproduce the behavior:
- laravel new project
- composer require joelbutcher/socialstream
- php artisan socialstream:install --stack=inertia --teams
- npm run dev
- visit the login or register uri's / routes
Expected behavior
Error given is the following, when installing socialstream, see the screenshots for the error in browser.
@ build /Users/cam/Sites/social
> vite build
vite v4.0.4 building for production...
transforming...
✓ 11 modules transformed.
[vite]: Rollup failed to resolve import "@inertiajs/inertia-vue3" from "/Users/cam/Sites/social/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`
error during build:
Error: [vite]: Rollup failed to resolve import "@inertiajs/inertia-vue3" from "/Users/cam/Sites/social/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:///Users/cam/Sites/social/node_modules/vite/dist/node/chunks/dep-5e7f419b.js:44636:19)
at onwarn (file:///Users/cam/Sites/social/node_modules/vite/dist/node/chunks/dep-5e7f419b.js:44407:13)
at Object.onwarn (file:///Users/cam/Sites/social/node_modules/rollup/dist/es/shared/rollup.js:24523:13)
at ModuleLoader.handleInvalidResolvedId (file:///Users/cam/Sites/social/node_modules/rollup/dist/es/shared/rollup.js:23207:26)
at file:///Users/cam/Sites/social/node_modules/rollup/dist/es/shared/rollup.js:23167:26
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ build: `vite build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/cam/.npm/_logs/2023-02-01T08_00_20_987Z-debug.log
Environment context
- Socialstream version: current
- Jetstream stack: Inertia
- Laravel version: v9.49.0
- PHP version: 8.2.1
Please update your socialstream version to v3.8.3