Comments (4)
Looks like fpvdrone is a binary module and you'll need to add it to your externals as well.
BTW there's rollup-plugin-node-externals
to handle the node imports automatically
from qwik.
@wmertens i dont know where you see this / get the idea that "fpvdrone" is even a package?
shure, the word fpv-drone-info is in the file path, but only because thats the name of the project / root project folder...
there is no package with fpvdrone in its name
from qwik.
@wmertens anyway, i tried the plugin you mentioned and now i get another error :D
error during build:
TypeError [PLUGIN_ERROR]: Unknown file extension ".css" for /Users/jappy/code/fpv-drone.info/node_modules/@fontsource-variable/montserrat/wght.css
at Object.getFileProtocolModuleFormat [as file:] (node:internal/modules/esm/get_format:160:9)
at defaultGetFormat (node:internal/modules/esm/get_format:203:36)
at defaultLoad (node:internal/modules/esm/load:141:22)
at async ModuleLoader.load (node:internal/modules/esm/loader:409:7)
at async ModuleLoader.moduleProvider (node:internal/modules/esm/loader:291:45)
when i configure the plugin to not exclude node_modules, i am back to the original error
vite v5.2.4 building SSR bundle for production...
✓ 51 modules transformed.
x Build failed in 1.90s
error during build:
RollupError: Unexpected character '�'
at getRollupError (file:///Users/jappy/code/fpv-drone.info/node_modules/rollup/dist/es/shared/parseAst.js:376:41)
at ParseError.initialise (file:///Users/jappy/code/fpv-drone.info/node_modules/rollup/dist/es/shared/node-entry.js:11158:28)
at convertNode (file:///Users/jappy/code/fpv-drone.info/node_modules/rollup/dist/es/shared/node-entry.js:12898:10)
at convertProgram (file:///Users/jappy/code/fpv-drone.info/node_modules/rollup/dist/es/shared/node-entry.js:12218:12)
at Module.setSource (file:///Users/jappy/code/fpv-drone.info/node_modules/rollup/dist/es/shared/node-entry.js:14042:24)
at async ModuleLoader.addModuleSource (file:///Users/jappy/code/fpv-drone.info/node_modules/rollup/dist/es/shared/node-entry.js:18681:13)
undefined
this is the config i used:
import { UserConfig, defineConfig } from "vite";
import { qwikVite } from "@builder.io/qwik/optimizer";
import { qwikCity } from "@builder.io/qwik-city/vite";
import { builderDevTools } from "@builder.io/dev-tools/vite";
import tsconfigPaths from "vite-tsconfig-paths";
import { qwikReact } from '@builder.io/qwik-react/vite';
import nodeExternals from 'rollup-plugin-node-externals'
export default defineConfig(() => {
return {
plugins: [builderDevTools(), qwikCity(), qwikVite(), tsconfigPaths(), qwikReact()],
optimizeDeps: {
exclude: ['@uav.painkillers/pid-analyzer-wasm']
},
build: {
rollupOptions: {
plugins: [nodeExternals({
deps: false,
devDeps: false,
peerDeps: false,
optDeps: false,
})]
}
}
} as UserConfig;
});
i am using @fontsource packages for font managing, seems like the plugin does not like that...
from qwik.
@wmertens i dont know where you see this / get the idea that "fpvdrone" is even a package?
I shouldn't answer from my phone before coffee ;-)
I saw it complain about the unknown character and I just assumed it was a binary dep but that wouldn't make sense.
You can just put nodeExternals()
together with the rest of the plugins.
To figure out which file is problematic, try some console logging debugging like rollup/rollup#1215 (comment)
from qwik.
Related Issues (20)
- [🐞]icons not working in production or in preview mode HOT 1
- [🐞] Qwik server crashes when entering multiple slashes at the end of a home route
- [🐞] Sitemap is not generating / finding routes when using localized routing HOT 1
- [✅] The Edge Function "_qwik-city" is referencing unsupported modules HOT 1
- [🐞] useStylesScoped$ doesn't support nested CSS HOT 8
- [🐞] Qwik Insights returns 500 error for fetching data/strategy HOT 3
- [🐞] Invalid module "@qwik-city-plan" is not a valid package name imported from HOT 12
- Code split loading[🐞] HOT 2
- [🐞] Error Integrating React Libraries (Material ui) in Qwik Framework HOT 1
- [🐞] ERR_TOO_MANY_REDIRECTS – Redirect loop on qwik.dev HOT 2
- [🐞] Qwik Form resets translated strings on submit to original language (qwik-speak) HOT 2
- [✨] feat: add support for eslint flat config - eslint-plugin-qwik HOT 4
- [🐞] Missing "export" in some types HOT 1
- [🐞] In dev mode when saving a change, it sometimes gives an error "aborted" HOT 2
- [🐞] The CJS build of Vite's Node API is deprecated HOT 1
- [🐞] Bun adapter breaks / hangs build
- [🐞] Excalidraw Integration HOT 1
- Qwik City injects style for `view-transition-name: none`
- [🐞] Build static with custom origin protocol is broken HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qwik.