rgasch / filament-extended-starter-kit

73 stars 9 forks source link

Rollup failed to resolve import "@awcodes/alpine-floating-ui" duing "npm run build" #8

Closed mnishihan closed 1 year ago

mnishihan commented 1 year ago

When I run npm run build command, following error occurs:

[vite]: Rollup failed to resolve import "@awcodes/alpine-floating-ui" from "resources/js/app.js".
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 "@awcodes/alpine-floating-ui" from "resources/js/app.js".
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/shihan/workspace/laravel/filament-extended-starter-kit/node_modules/vite/dist/node/chunks/dep-665b0112.js:45824:19)
    at onwarn (file:///Users/shihan/workspace/laravel/filament-extended-starter-kit/node_modules/vite/dist/node/chunks/dep-665b0112.js:45622:13)
    at Object.onwarn (file:///Users/shihan/workspace/laravel/filament-extended-starter-kit/node_modules/rollup/dist/es/shared/rollup.js:23225:13)
    at ModuleLoader.handleResolveId (file:///Users/shihan/workspace/laravel/filament-extended-starter-kit/node_modules/rollup/dist/es/shared/rollup.js:22352:26)
    at file:///Users/shihan/workspace/laravel/filament-extended-starter-kit/node_modules/rollup/dist/es/shared/rollup.js:22313:26

After adding @awcodes/alpine-floating-ui package as a devDependency in package.json, the above issue is resolved.

I'll send a PR with updated package.json and package-lock.json files soon.