windmill-labs / windmill-labs/windmill

bug: npm run build raise error

Open
#4,516 5 comments 0 reactions 1 assignee View on GitHub

@rubenfiszel is already working on this.

Since Oct 10, 2024.

bug
Dominant language
Rust
Stars
18k
Forks
1.1k
Avg merge
1d 1h
Merged PRs (30d)
328

Description

Describe the bug

npm run build

> windmill-components@1.405.5 build
> vite build

11:24:32 [vite-plugin-svelte] WARNING: The following packages have a svelte field in their package.json but no exports condition for svelte.

svelte-carousel@1.0.25
svelte-tiny-virtual-list@2.0.5
@rgossiaux/svelte-headlessui@2.0.0
simple-svelte-autocomplete@2.5.2
svelte-range-slider-pips@2.3.1

Please see https://github.com/sveltejs/vite-plugin-svelte/blob/main/docs/faq.md#missing-exports-condition for details.
vite v5.4.0 building SSR bundle for production...
[plugin:vite:dynamic-import-vars] [plugin vite:dynamic-import-vars] src/routes/(root)/(logged)/apps/get_raw/[version]/[...path]/+page.svelte: invalid import "/api/w/${$workspaceStore}/raw_apps/get_data/${$page.params.version}/${$page.params.path}". Variable absolute imports are not supported, imports must start with ./ in the static part of the import. For example: import(`./foo/${bar}.js`).
transforming (176) src/lib/components/table/Cell.svelte11:24:35 [vite-plugin-svelte] /Users/x/Documents/windmill/frontend/src/lib/components/schema/EditableSchemaWrapper.svelte:119:4 A11y: Avoid using autofocus
117:     {:else}
118:       <input
119:         autofocus={true}
             ^
120:         bind:value={formatExtension}
121:         class="!h-[32px] py-1 !text-xs !w-64"
transforming (260) src/lib/components/Dev.svelte
warn - The `@variants` directive has been deprecated in Tailwind CSS v3.0.
warn - Use `@layer utilities` or `@layer components` instead.
warn - https://tailwindcss.com/docs/upgrade-guide#replace-variants-with-layer
transforming (350) node_modules/lucide-svelte/dist/svelte/icons/annoyed.svelte11:24:41 [vite-plugin-svelte] /Users/x/Documents/windmill/frontend/node_modules/simple-svelte-autocomplete/src/SimpleAutocomplete.svelte:1149:14 A11y: <span> with click, keypress handlers must have an ARIA role
1147:             <div class="tags has-addons">
1148:               <span class="tag">{safeLabelFunction(tagItem)}</span>
1149:               <span
                    ^
1150:                 class="tag is-delete"
1151:                 on:click|preventDefault={unselectItem(tagItem)}
11:24:41 [vite-plugin-svelte] /Users/x/Documents/windmill/frontend/node_modules/simple-svelte-autocomplete/src/SimpleAutocomplete.svelte:1136:8 A11y: <div> with dragstart, dragover, dragleave, drop handlers must have an ARIA role
1134:     {#if multiple && hasSelection}
1135:       {#each selectedItem as tagItem, i (valueFunction(tagItem, true))}
1136:         <div
              ^
1137:           draggable={true}
1138:           animate:flip={{ duration: 200 }}
11:24:41 [vite-plugin-svelte] /Users/x/Documents/windmill/frontend/node_modules/simple-svelte-autocomplete/src/SimpleAutocomplete.svelte:1186:6 A11y: <span> with click, keypress handlers must have an ARIA role
1184:     />
1185:     {#if clearable}
1186:       <span
            ^
1187:         on:click={clear}
1188:         on:keypress={(e) => {e.key == "Enter" && clear()}}
11:24:41 [vite-plugin-svelte] /Users/x/Documents/windmill/frontend/node_modules/simple-svelte-autocomplete/src/SimpleAutocomplete.svelte:1203:10 A11y: <div> with click, keypress handlers must have an ARIA role
1201:       {#each filteredListItems as listItem, i}
1202:         {#if listItem && (maxItemsToShowInList <= 0 || i < maxItemsToShowInList)}
1203:           <div
                ^
1204:             class="autocomplete-list-item"
1205:             class:selected={i === highlightIndex}
11:24:41 [vite-plugin-svelte] /Users/x/Documents/windmill/frontend/node_modules/simple-svelte-autocomplete/src/SimpleAutocomplete.svelte:1243:6 A11y: <div> with click, keypress handlers must have an ARIA role
1241:       </div>
1242:     {:else if create}
1243:       <div
            ^
1244:         class="autocomplete-list-item-create"
1245:         on:click={selectItem}
✓ 2333 modules transformed.
x Build failed in 15.27s
error during build:
src/lib/gen/services.gen.ts (10:0): Using the export keyword between a decorator and a class is not allowed. Please use `export @dec class` instead. (Note that you need plugins to import files that are not JavaScript)
file: /Users/x/Documents/windmill/frontend/src/lib/gen/services.gen.ts:10:0

 8: import type { BackendVersionResponse, BackendUptodateResponse, GetLicenseIdResponse, GetOpenApiYamlResponse, GetAudit...
 9: 
10: @Injectable({
    ^
11:     providedIn: 'root'
12: })

RollupError: Using the export keyword between a decorator and a class is not allowed. Please use `export @dec class` instead.
    at getRollupError (file:///Users/x/Documents/windmill/frontend/node_modules/rollup/dist/es/shared/parseAst.js:392:41)
    at ParseError.initialise (file:///Users/x/Documents/windmill/frontend/node_modules/rollup/dist/es/shared/node-entry.js:11485:28)
    at convertNode (file:///Users/x/Documents/windmill/frontend/node_modules/rollup/dist/es/shared/node-entry.js:13181:10)
    at convertProgram (file:///Users/x/Documents/windmill/frontend/node_modules/rollup/dist/es/shared/node-entry.js:12525:12)
    at Module.setSource (file:///Users/x/Documents/windmill/frontend/node_modules/rollup/dist/es/shared/node-entry.js:14346:24)
    at async ModuleLoader.addModuleSource (file:///Users/x/Documents/windmill/frontend/node_modules/rollup/dist/es/shared/node-entry.js:19003:13)

To reproduce
  1. Go to 'frontend'
  2. run 'npm run build'
  3. See error
Expected behavior

npm run build success

Screenshots
image
Browser information

chrome 129.0.6668.100

Application version

1.406.0

Additional Context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.