Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bit build error: bitdev.vue/[email protected], task "teambit.preview/preview:GeneratePreview" threw an error You must supply options.input to rollup #9127

Open
subham25997 opened this issue Aug 20, 2024 · 19 comments

Comments

@subham25997
Copy link

subham25997 commented Aug 20, 2024

When I do bit build, I am getting following error:
image

Please help me to resolve this as soon as possible. Let me know if you need any other information.

Specifications

  • Bit version: 1.8.20
  • Node version: 20.16.0
  • npm version: 10.8.1
@subham25997
Copy link
Author

subham25997 commented Aug 21, 2024

Can someone help?

I tried following things to fix it:

  • Deleting node modules and reinstalling deps
  • Reinstalling bit using npm i @teambit/bvm and bvm install

But it didn't fix the issue.

@Jinjiang
Copy link
Member

@subham25997 I'm handling this. 🙏

@Jinjiang
Copy link
Member

@subham25997 may I know the bit list and bit envs output?

Honestly, I've met this issue before (on macOS) but this time w/ a single vue component on vue-env v1.1.3 on bit v1.8.20 I couldn't. I guess there are some other triggers.

Thanks.

@subham25997
Copy link
Author

subham25997 commented Aug 22, 2024

@Jinjiang bit list shows:

┌───────────────────────────────────────┬─────────────────┬───────────────────┐
│ component ID                          │ latest in scope │ used in workspace │
├───────────────────────────────────────┼─────────────────┼───────────────────┤
│ suite360/composables/use-table-header │ 0.0.5           │ 0.0.1             │
├───────────────────────────────────────┼─────────────────┼───────────────────┤
│ suite360/core/app-navigation          │ 0.0.5           │ 0.0.2             │
├───────────────────────────────────────┼─────────────────┼───────────────────┤
│ suite360/core/custom-button           │ 0.0.6           │ 0.0.2             │
├───────────────────────────────────────┼─────────────────┼───────────────────┤
│ suite360/core/data-table              │ 0.0.7           │ 0.0.2             │
├───────────────────────────────────────┼─────────────────┼───────────────────┤
│ suite360/envs/my-vue-env              │ 0.0.4           │ 0.0.2             │
├───────────────────────────────────────┼─────────────────┼───────────────────┤
│ suite360/envs/my-vue-wrapper          │ 0.0.3           │ 0.0.1             │
├───────────────────────────────────────┼─────────────────┼───────────────────┤
│ suite360/layouts/default-layout       │ 0.0.8           │ 0.0.3             

bit envs shows:

┌─────────────────────────────────────────────┬────────────────────────────────────┐
│ component                                   │ env                                │
├─────────────────────────────────────────────┼────────────────────────────────────┤
│ suite360/composables/[email protected] │ suite360/envs/[email protected]     │
├─────────────────────────────────────────────┼────────────────────────────────────┤
│ suite360/core/[email protected]          │ suite360/envs/[email protected]     │
├─────────────────────────────────────────────┼────────────────────────────────────┤
│ suite360/core/[email protected]           │ suite360/envs/[email protected]     │
├─────────────────────────────────────────────┼────────────────────────────────────┤
│ suite360/core/[email protected]              │ suite360/envs/[email protected]     │
├─────────────────────────────────────────────┼────────────────────────────────────┤
│ suite360/envs/[email protected]              │ bitdev.general/envs/[email protected] │
├─────────────────────────────────────────────┼────────────────────────────────────┤
│ suite360/envs/[email protected]          │ bitdev.vue/[email protected]           │
├─────────────────────────────────────────────┼────────────────────────────────────┤
│ suite360/layouts/[email protected]       │ suite360/envs/[email protected]     │
└─────────────────────────────────────────────┴────────────────────────────────────┘

@Jinjiang
Copy link
Member

@subham25997 sorry I still couldn't reproduce it. Would you mind sending me your workspace with a zip file? the node_modules folder could be skipped since I can run bit install to get them back. thanks.

@subham25997
Copy link
Author

@Jinjiang Please find the attached zip folder
suite360-workspace.zip

@Jinjiang
Copy link
Member

@subham25997 interestingly, I still couldn't reproduce it. And after some modifications this zip works from my side:
issue-9172-suite360-workspace.zip
what I've changed (you can also refer to the diff file):

  1. First of all, seems yoru remote scope is not the public one, so I have to set all the scope of local components as empty from .bitmap and reset their envs. (you don't have to do this step based on your original workspace)
  2. fixed some type errors and linting errors
    • <!-- eslint-disable-next-line vue/require-v-for-key --> in use-table-header
    • // eslint-disable-next-line @typescript-eslint/no-explicit-any and const useCounter: any = () => {}; in use-table-header
    • // eslint-disable-next-line @typescript-eslint/no-unused-vars in use-table-header
    • preview() as any in my-vue-env
  3. skipped all the test cases
  4. my-vue-env: fixed the __dirname as bit build failed: dev+vue.dev-services.linter.v_zh54tchgb56oqy7unumk5ggzty\node_modules\@bitdev\vue.dev-services.linter.vue-eslint-config\dist\index.js': Cannot find module '@typescript-esdev+vue.dev-services.linter.v_zlint/eslint-plugin' #9112 (comment) suggested
    • import { fileURLToPath } from 'url'
    • const __dirname = dirname(fileURLToPath(import.meta.url));
  5. my-vue-wrapper: update its env from vue-env v1.1.0 to v1.1.3

The diff:

diff --git a/.bitmap b/.bitmap
index 37f46ce..89619e8 100644
--- a/.bitmap
+++ b/.bitmap
@@ -11,52 +11,101 @@
 {
     "composables/use-table-header": {
         "name": "composables/use-table-header",
-        "scope": "suite360",
-        "version": "0.0.1",
+        "scope": "",
+        "version": "",
+        "defaultScope": "suite360",
         "mainFile": "index.ts",
-        "rootDir": "suite360/composables/use-table-header"
+        "rootDir": "suite360/composables/use-table-header",
+        "config": {
+            "suite360/envs/my-vue-env": {},
+            "teambit.envs/envs": {
+                "env": "suite360/envs/my-vue-env"
+            }
+        }
     },
     "core/app-navigation": {
         "name": "core/app-navigation",
-        "scope": "suite360",
-        "version": "0.0.2",
+        "scope": "",
+        "version": "",
+        "defaultScope": "suite360",
         "mainFile": "index.ts",
-        "rootDir": "suite360/core/app-navigation"
+        "rootDir": "suite360/core/app-navigation",
+        "config": {
+            "suite360/envs/my-vue-env": {},
+            "teambit.envs/envs": {
+                "env": "suite360/envs/my-vue-env"
+            }
+        }
     },
     "core/custom-button": {
         "name": "core/custom-button",
-        "scope": "suite360",
-        "version": "0.0.2",
+        "scope": "",
+        "version": "",
+        "defaultScope": "suite360",
         "mainFile": "index.ts",
-        "rootDir": "suite360/core/custom-button"
+        "rootDir": "suite360/core/custom-button",
+        "config": {
+            "suite360/envs/my-vue-env": {},
+            "teambit.envs/envs": {
+                "env": "suite360/envs/my-vue-env"
+            }
+        }
     },
     "core/data-table": {
         "name": "core/data-table",
-        "scope": "suite360",
-        "version": "0.0.2",
+        "scope": "",
+        "version": "",
+        "defaultScope": "suite360",
         "mainFile": "index.ts",
-        "rootDir": "suite360/core/data-table"
+        "rootDir": "suite360/core/data-table",
+        "config": {
+            "suite360/envs/my-vue-env": {},
+            "teambit.envs/envs": {
+                "env": "suite360/envs/my-vue-env"
+            }
+        }
     },
     "envs/my-vue-env": {
         "name": "envs/my-vue-env",
-        "scope": "suite360",
-        "version": "0.0.2",
+        "scope": "",
+        "version": "",
+        "defaultScope": "suite360",
         "mainFile": "index.ts",
-        "rootDir": "suite360/envs/my-vue-env"
+        "rootDir": "suite360/envs/my-vue-env",
+        "config": {
+            "bitdev.general/envs/[email protected]": {},
+            "teambit.envs/envs": {
+                "env": "bitdev.general/envs/bit-env"
+            }
+        }
     },
     "envs/my-vue-wrapper": {
         "name": "envs/my-vue-wrapper",
-        "scope": "suite360",
-        "version": "0.0.1",
+        "scope": "",
+        "version": "",
+        "defaultScope": "suite360",
         "mainFile": "index.ts",
-        "rootDir": "suite360/envs/my-vue-wrapper"
+        "rootDir": "suite360/envs/my-vue-wrapper",
+        "config": {
+            "bitdev.vue/[email protected]": {},
+            "teambit.envs/envs": {
+                "env": "bitdev.vue/vue-env"
+            }
+        }
     },
     "layouts/default-layout": {
         "name": "layouts/default-layout",
-        "scope": "suite360",
-        "version": "0.0.3",
+        "scope": "",
+        "version": "",
+        "defaultScope": "suite360",
         "mainFile": "index.ts",
-        "rootDir": "suite360/layouts/default-layout"
+        "rootDir": "suite360/layouts/default-layout",
+        "config": {
+            "suite360/envs/my-vue-env": {},
+            "teambit.envs/envs": {
+                "env": "suite360/envs/my-vue-env"
+            }
+        }
     },
     "$schema-version": "17.0.0"
 }
diff --git a/suite360/composables/use-table-header/use-table-header-basic.fixture.vue b/suite360/composables/use-table-header/use-table-header-basic.fixture.vue
index 07de3a0..6737a35 100644
--- a/suite360/composables/use-table-header/use-table-header-basic.fixture.vue
+++ b/suite360/composables/use-table-header/use-table-header-basic.fixture.vue
@@ -7,6 +7,7 @@ const { mobileTableHeaders } = useMobileInformation();
   <div>
     <h5>Table headers are:</h5>
     <ul>
+      <!-- eslint-disable-next-line vue/require-v-for-key -->
       <li v-for="header of mobileTableHeaders">
         { title: {{ header.title }}, key: {{ header.key }} }
       </li>
diff --git a/suite360/composables/use-table-header/use-table-header.spec.ts b/suite360/composables/use-table-header/use-table-header.spec.ts
index 887e67e..5f10e6d 100644
--- a/suite360/composables/use-table-header/use-table-header.spec.ts
+++ b/suite360/composables/use-table-header/use-table-header.spec.ts
@@ -1,9 +1,12 @@
 import { render } from "@testing-library/vue";
 import { BasicUseTableHeader } from "./use-table-header.composition";
 
-import { useCounter } from "./use-table-header"
+// import { useCounter } from "./use-table-header"
 
-describe("useCounter", () => {
+// eslint-disable-next-line @typescript-eslint/no-explicit-any
+const useCounter: any = () => {};
+
+describe.skip("useCounter", () => {
   it("should be defined", () => {
     expect(useCounter).toBeDefined();
   });
@@ -80,7 +83,7 @@ describe("useCounter", () => {
   });
 });
 
-describe("BasicUseTableHeader", () => {
+describe.skip("BasicUseTableHeader", () => {
   it("should render", async () => {
     const { getByText, findByText } = render(BasicUseTableHeader);
 
diff --git a/suite360/composables/use-table-header/use-table-header.ts b/suite360/composables/use-table-header/use-table-header.ts
index 6d11511..0301f65 100644
--- a/suite360/composables/use-table-header/use-table-header.ts
+++ b/suite360/composables/use-table-header/use-table-header.ts
@@ -12,6 +12,7 @@ export interface UseCounterOptions {
  * @param [initialValue=0]
  * @param {Object} options
  */
+// eslint-disable-next-line @typescript-eslint/no-unused-vars
 export function useMobileInformation(initialValue = 0, options: UseCounterOptions = {}) {
   const mobileTableHeaders = ref([
     {
diff --git a/suite360/core/app-navigation/app-navigation.spec.ts b/suite360/core/app-navigation/app-navigation.spec.ts
index 028f077..9d01dde 100644
--- a/suite360/core/app-navigation/app-navigation.spec.ts
+++ b/suite360/core/app-navigation/app-navigation.spec.ts
@@ -1,8 +1,8 @@
 import { render } from "@testing-library/vue";
 import { BasicAppNavigation } from "./app-navigation.composition";
 
-// it("should render with the correct text", () => {
+it.skip("should render with the correct text", () => {
   const { getByText } = render(BasicAppNavigation);
   const rendered = getByText(/Hello World/);
   expect(rendered).toBeTruthy();
 });
diff --git a/suite360/core/data-table/data-table.spec.ts b/suite360/core/data-table/data-table.spec.ts
index 1204e41..8d47234 100644
--- a/suite360/core/data-table/data-table.spec.ts
+++ b/suite360/core/data-table/data-table.spec.ts
@@ -1,7 +1,7 @@
 import { render } from "@testing-library/vue";
 import { BasicDataTable } from "./data-table.composition";
 
-it("should render with the correct text", () => {
+it.skip("should render with the correct text", () => {
   const { getByText } = render(BasicDataTable);
   const rendered = getByText(/Hello World/);
   expect(rendered).toBeTruthy();
diff --git a/suite360/envs/my-vue-env/my-vue-env.bit-env.ts b/suite360/envs/my-vue-env/my-vue-env.bit-env.ts
index 4c98c32..e1da9d7 100644
--- a/suite360/envs/my-vue-env/my-vue-env.bit-env.ts
+++ b/suite360/envs/my-vue-env/my-vue-env.bit-env.ts
@@ -4,6 +4,7 @@
  */
 import { createRequire } from 'module';
 import { dirname } from 'path';
+import { fileURLToPath } from 'url'
 
 import { VueEnv } from '@bitdev/vue.vue-env';
 
@@ -20,7 +21,7 @@ import { VueVitePreview } from '@bitdev/vue.dev-services.preview.vue-vite-previe
 const require = createRequire(import.meta.url);
 
 // eslint-disable-next-line @typescript-eslint/naming-convention
-const __dirname = dirname(new URL(import.meta.url).pathname);
+const __dirname = dirname(fileURLToPath(import.meta.url));
 
 // Ensure @bitdev/vue.envs.vue-modern-env/config/tsconfig.json in ./config/tsconfig.json
 require.resolve('@bitdev/vue.envs.vue-modern-env');
@@ -95,7 +96,7 @@ export class MyVueEnv extends VueEnv {
       docsTemplate: require.resolve('./preview/docs.js'),
       mounter: require.resolve('./preview/mounter.js'),
       viteConfig: require.resolve('./config/vite.config.mjs'),
-    });
+    }) as any;
   }
 
   /**
diff --git a/suite360/layouts/default-layout/default-layout.spec.ts b/suite360/layouts/default-layout/default-layout.spec.ts
index 3ebb00c..e987ef3 100644
--- a/suite360/layouts/default-layout/default-layout.spec.ts
+++ b/suite360/layouts/default-layout/default-layout.spec.ts
@@ -1,8 +1,8 @@
 import { render } from "@testing-library/vue";
 import { BasicDefaultLayout } from "./default-layout.composition";
 
-it("should render with the correct text", () => {
+it.skip("should render with the correct text", () => {
   const { getByText } = render(BasicDefaultLayout);
   const rendered = getByText(/Hello World/);
   expect(rendered).toBeTruthy();
 });

build log:

C:\Users\zhaoj\code\issue-9172-suite360-workspace>bit build
✔ install packages in 7 capsules. Succeeded in 1m
  Total 7 components to build
  

  Running build pipeline using 3 environment(s), total 34 tasks 
  building 5 components of env "suite360/envs/my-vue-env". original seeders of this env: 5, graph of this env: 5, graph total (include other envs): 7
  building 1 components of env "bitdev.general/envs/[email protected]". original seeders of this env: 1, graph of this env: 1, graph total (include other envs): 2
  building 1 components of env "bitdev.vue/[email protected]". original seeders of this env: 1, graph of this env: 1, graph total (include other envs): 1
✔ (1/34) (envs/my-vue-env) [Aspect: CoreExporter] Completed successfully in 512μs
✔ (2/34) (envs/bit-env) [Aspect: CoreExporter] Completed successfully in 56μs
✔ (3/34) (vue-env) [Aspect: CoreExporter] Completed successfully in 41μs
✔ (4/34) (envs/my-vue-env) [Compiler: VueCompiler] Completed successfully in 18s
✔ (5/34) (vue-env) [Compiler: VueCompiler] Completed successfully in 4s
✔ (6/34) (envs/bit-env) [Compiler: TypescriptCompile] Completed successfully in 3s
⠼ (7/34) (envs/my-vue-env) [Tester: VitestTest] testing components using Vitest
 RUN  v2.0.5 C:/Users/zhaoj/AppData/Local/Bit/capsules/ec7a45a57

⠧ (7/34) (envs/my-vue-env) [Tester: VitestTest] testing components using Vitest ↓ suite360_composables_use-table-header/dist/u ↓ suite360_composables_use-table-header/dist/use-table-header.spec.js (4) [skipped]
 ↓ suite360_core_app-navigation/dist/app-navigation.spec.js (1) [skipped]
 ✓ suite360_core_custom-button/dist/custom-button.spec.js (1)
 ↓ suite360_core_data-table/dist/data-table.spec.js (1) [skipped]
 ↓ suite360_layouts_default-layout/dist/default-layout.spec.js (1) [skipped]

 Test Files  1 passed | 4 skipped (5)
      Tests  1 passed | 7 skipped (8)
   Start at  11:39:30
   Duration  1.18s (transform 275ms, setup 0ms, collect 2.16s, tests 18ms, environment 2.09s, prepare 381ms)

✔ (7/34) (envs/my-vue-env) [Tester: VitestTest] Completed successfully in 2s
✔ (8/34) (envs/bit-env) [Tester: VitestTest] Completed successfully in 712μs
⠋ (9/34) (vue-env) [Tester: VitestTest] testing components using Vitest
 RUN  v2.0.5 C:/Users/zhaoj/AppData/Local/Bit/capsules/ec7a45a57

⠙ (9/34) (vue-env) [Tester: VitestTest] testing components using Vitest · suite360_envs_my-vue-wrapper/dist/my-wrapper.spec.js ✓ suite360_envs_my-vue-wrapper/dist/my-wrapper.spec.js (1)
   ✓ should render with the correct text

 Test Files  1 passed (1)
      Tests  1 passed (1)
   Start at  11:39:31
   Duration  990ms (transform 27ms, setup 0ms, collect 322ms, tests 29ms, environment 376ms, prepare 78ms)

✔ (9/34) (vue-env) [Tester: VitestTest] Completed successfully in 1s
✔ (10/34) (vue-env) [Tester: dummy] Completed successfully in 4ms
⠋ linting components (1/5) component: suite360/composables/use-table-header, # of files: 6=============

WARNING: You are currently running a version of TypeScript which is not officially supported by @typescript-eslint/typescript-estree.

You may find that it works just fine, or you may not.

SUPPORTED TYPESCRIPT VERSIONS: >=4.3.5 <5.4.0

YOUR TYPESCRIPT VERSION: 5.5.4

Please only submit bug reports when using the officially supported version.

=============
✔ (11/34) (envs/my-vue-env) [Linter: EslintLint] Completed successfully in 1s
✔ (12/34) (envs/bit-env) [Linter: EslintLint] Completed successfully in 6s
✔ (13/34) (vue-env) [Linter: EslintLint] Completed successfully in 780ms
✔ (14/34) (envs/my-vue-env) [Ui: BundleUI] Completed successfully in 190μs
✔ (15/34) (envs/my-vue-env) [Application: build_application] Completed successfully in 2ms
✔ (16/34) (envs/my-vue-env) [Pkg: PreparePackages] Completed successfully in 3ms
✔ (17/34) (envs/my-vue-env) [Schema: ExtractSchema] Completed successfully in 2s
✔ (18/34) (envs/my-vue-env) [Preview: GenerateEnvTemplate] Completed successfully in 2ms
⠋ running Vite bundler (1/1) running on 5 componentsvite v5.4.2 building for production...
"default" is imported from external module "react" but never used in "../../AppData/Local/Bit/capsules/ec7a45a57/suite360_composables_use-table-header/dist/use-table-header.docs.md".
✓ 5 modules transformed.
public/suite360_composables_use_table_header-preview.js  2.48 kB │ gzip: 1.06 kB
✓ built in 289ms
vite v5.4.2 building for production...
✓ 2 modules transformed.

(!) The public directory feature may not work correctly. outDir C:\Users\zhaoj\AppData\Local\Bit\capsules\ec7a45a57\suite360__envs\my-vue-env-preview\public and publicDir C:/Users/zhaoj/AppData/Local/Bit/capsules/ec7a45a57/suite360__envs/my-vue-env-preview/public are not separate folders.

public/suite360_composables_use_table_header-component.js  0.60 kB │ gzip: 0.37 kB
✓ built in 17ms
vite v5.4.2 building for production...
"default" is imported from external module "react" but never used in "../../AppData/Local/Bit/capsules/ec7a45a57/suite360_core_app-navigation/dist/app-navigation.docs.md".
✓ 5 modules transformed.

(!) The public directory feature may not work correctly. outDir C:\Users\zhaoj\AppData\Local\Bit\capsules\ec7a45a57\suite360__envs\my-vue-env-preview\public and publicDir C:/Users/zhaoj/AppData/Local/Bit/capsules/ec7a45a57/suite360__envs/my-vue-env-preview/public are not separate folders.

public/suite360_core_app_navigation-preview.js  3.07 kB │ gzip: 1.30 kB
✓ built in 32ms
vite v5.4.2 building for production...
✓ 2 modules transformed.

(!) The public directory feature may not work correctly. outDir C:\Users\zhaoj\AppData\Local\Bit\capsules\ec7a45a57\suite360__envs\my-vue-env-preview\public and publicDir C:/Users/zhaoj/AppData/Local/Bit/capsules/ec7a45a57/suite360__envs/my-vue-env-preview/public are not separate folders.

public/suite360_core_app_navigation-component.js  1.44 kB │ gzip: 0.70 kB
✓ built in 22ms
vite v5.4.2 building for production...
"default" is imported from external module "react" but never used in "../../AppData/Local/Bit/capsules/ec7a45a57/suite360_core_custom-button/dist/custom-button.docs.md".
✓ 6 modules transformed.

(!) The public directory feature may not work correctly. outDir C:\Users\zhaoj\AppData\Local\Bit\capsules\ec7a45a57\suite360__envs\my-vue-env-preview\public and publicDir C:/Users/zhaoj/AppData/Local/Bit/capsules/ec7a45a57/suite360__envs/my-vue-env-preview/public are not separate folders.

public/static/css/suite360/core/custom-button-preview.1724729982173.css  0.04 kB │ gzip: 0.06 kB
public/suite360_core_custom_button-preview.js                            1.81 kB │ gzip: 0.90 kB
✓ built in 40ms
vite v5.4.2 building for production...
✓ 3 modules transformed.

(!) The public directory feature may not work correctly. outDir C:\Users\zhaoj\AppData\Local\Bit\capsules\ec7a45a57\suite360__envs\my-vue-env-preview\public and publicDir C:/Users/zhaoj/AppData/Local/Bit/capsules/ec7a45a57/suite360__envs/my-vue-env-preview/public are not separate folders.

public/static/css/suite360/core/custom-button.1724729982173.css  0.04 kB │ gzip: 0.06 kB
public/suite360_core_custom_button-component.js                  0.58 kB │ gzip: 0.39 kB
✓ built in 24ms
vite v5.4.2 building for production...
"default" is imported from external module "react" but never used in "../../AppData/Local/Bit/capsules/ec7a45a57/suite360_core_data-table/dist/data-table.docs.md".
✓ 6 modules transformed.

(!) The public directory feature may not work correctly. outDir C:\Users\zhaoj\AppData\Local\Bit\capsules\ec7a45a57\suite360__envs\my-vue-env-preview\public and publicDir C:/Users/zhaoj/AppData/Local/Bit/capsules/ec7a45a57/suite360__envs/my-vue-env-preview/public are not separate folders.

public/static/css/suite360/core/data-table-preview.1724729982173.css  0.04 kB │ gzip: 0.06 kB
public/suite360_core_data_table-preview.js                            3.30 kB │ gzip: 1.46 kB
✓ built in 44ms
vite v5.4.2 building for production...
✓ 3 modules transformed.

(!) The public directory feature may not work correctly. outDir C:\Users\zhaoj\AppData\Local\Bit\capsules\ec7a45a57\suite360__envs\my-vue-env-preview\public and publicDir C:/Users/zhaoj/AppData/Local/Bit/capsules/ec7a45a57/suite360__envs/my-vue-env-preview/public are not separate folders.

public/static/css/suite360/core/data-table.1724729982173.css  0.04 kB │ gzip: 0.06 kB
public/suite360_core_data_table-component.js                  0.76 kB │ gzip: 0.42 kB
✓ built in 26ms
vite v5.4.2 building for production...
"default" is imported from external module "react" but never used in "../../AppData/Local/Bit/capsules/ec7a45a57/suite360_layouts_default-layout/dist/default-layout.docs.md".
✓ 7 modules transformed.

(!) The public directory feature may not work correctly. outDir C:\Users\zhaoj\AppData\Local\Bit\capsules\ec7a45a57\suite360__envs\my-vue-env-preview\public and publicDir C:/Users/zhaoj/AppData/Local/Bit/capsules/ec7a45a57/suite360__envs/my-vue-env-preview/public are not separate folders.

public/suite360_layouts_default_layout-preview.js  3.29 kB │ gzip: 1.36 kB
✓ built in 28ms
vite v5.4.2 building for production...
✓ 4 modules transformed.

(!) The public directory feature may not work correctly. outDir C:\Users\zhaoj\AppData\Local\Bit\capsules\ec7a45a57\suite360__envs\my-vue-env-preview\public and publicDir C:/Users/zhaoj/AppData/Local/Bit/capsules/ec7a45a57/suite360__envs/my-vue-env-preview/public are not separate folders.

public/suite360_layouts_default_layout-component.js  1.98 kB │ gzip: 0.84 kB
✓ built in 27ms
✔ (19/34) (envs/my-vue-env) [Preview: GeneratePreview] Completed successfully in 1s
✔ (20/34) (envs/my-vue-env) [Preview: PreBundlePreview] Completed successfully in 377μs
✔ (21/34) (envs/bit-env) [Ui: BundleUI] Completed successfully in 12μs
✔ (22/34) (envs/bit-env) [Application: build_application] Completed successfully in 575μs
✔ (23/34) (envs/bit-env) [Pkg: PreparePackages] Completed successfully in 881μs
✔ (24/34) (envs/bit-env) [Schema: ExtractSchema] Completed successfully in 3s
⠋ running Vite bundler (1/1) running on 1 componentsvite v5.4.2 building for production...
transforming (710) ..\..\..\..\..\..\.bvm\versions\1.8.20\bit-1.8.20\node_modules\graphql\utilities\astFromValue.mjsDeprecation Warning: Sass's behavior for declarations that appear after nested
rules will be changing to match the behavior specified by CSS in an upcoming
version. To keep the existing behavior, move the declaration above the nested
rule. To opt into the new behavior, wrap the declaration in `& {}`.

More info: https://sass-lang.com/d/mixed-decls


36  │ ┌     &:first-child {
37  │ │       border-top-left-radius: $borderRadius;
38  │ │       border-bottom-left-radius: $borderRadius;
39  │ │     }
    │ └─── nested rule
... │
41  │       margin-right: $gap;
    │       ^^^^^^^^^^^^^^^^^^ declaration

    ..\..\AppData\Local\.bvm\versions\1.8.20\bit-1.8.20\node_modules\@teambit\react.ui.component-highlighter\dist\label\component-strip.module.scss 41:5  root stylesheet

✓ 916 modules transformed.
public/.vite/manifest.json                      2.55 kB │ gzip:     0.55 kB
public/style.css                              141.48 kB │ gzip:    26.18 kB
public/peers.js                                 0.72 kB │ gzip:     0.41 kB
public/compositions-1724729986196.js            1.30 kB │ gzip:     0.64 kB
public/esm-C8S6wgTX.js                         24.51 kB │ gzip:     7.30 kB
public/index-BcIeokqp.js                       99.24 kB │ gzip:    25.38 kB
public/my-wrapper.vue-C1o6jC86.js             130.18 kB │ gzip:    37.03 kB
public/vue.runtime.esm-bundler-CKRubHNd.js    224.32 kB │ gzip:    68.97 kB
public/preview-root-1724729986196.js          300.00 kB │ gzip:    79.34 kB
public/preview.preview.runtime-tP1Y_ymn.js    633.34 kB │ gzip:   144.50 kB
public/index-DSremPIt.js                      661.58 kB │ gzip:   155.28 kB
public/overview-1724729986196.js            5,114.35 kB │ gzip: 1,354.62 kB
✓ built in 16.69s
✔ (25/34) (envs/bit-env) [Preview: GenerateEnvTemplate] Completed successfully in 17s
✔ (26/34) (envs/bit-env) [Preview: GeneratePreview] Completed successfully in 3s
✔ (27/34) (envs/bit-env) [Preview: PreBundlePreview] Completed successfully in 46μs
✔ (28/34) (vue-env) [Ui: BundleUI] Completed successfully in 14μs
✔ (29/34) (vue-env) [Application: build_application] Completed successfully in 2ms
✔ (30/34) (vue-env) [Pkg: PreparePackages] Completed successfully in 747μs
✔ (31/34) (vue-env) [Schema: ExtractSchema] Completed successfully in 5ms
✔ (32/34) (vue-env) [Preview: GenerateEnvTemplate] Completed successfully in 110μs
⠋ running Vite bundler (1/1) running on 1 componentsvite v5.4.2 building for production...
"default" is imported from external module "react" but never used in "../../AppData/Local/Bit/capsules/ec7a45a57/suite360_envs_my-vue-wrapper/dist/my-wrapper.docs.md".
✓ 5 modules transformed.
public/suite360_envs_my_vue_wrapper-preview.js  1.64 kB │ gzip: 0.82 kB
✓ built in 31ms
vite v5.4.2 building for production...
✓ 2 modules transformed.

(!) The public directory feature may not work correctly. outDir C:\Users\zhaoj\AppData\Local\Bit\capsules\ec7a45a57\[email protected]\public and publicDir C:/Users/zhaoj/AppData/Local/Bit/capsules/ec7a45a57/[email protected]/public are not separate folders.

public/suite360_envs_my_vue_wrapper-component.js  0.42 kB │ gzip: 0.30 kB
✓ built in 19ms
✔ (33/34) (vue-env) [Preview: GeneratePreview] Completed successfully in 172ms
✔ (34/34) (vue-env) [Preview: PreBundlePreview] Completed successfully in 35μs
✔ Running build pipeline using 3 environment(s), total 34 tasks. Succeeded in 1m
  build output can be found in path: C:\Users\zhaoj\AppData\Local\Bit\capsules\ec7a45a57
build succeeded. completed in 3m.

C:\Users\zhaoj\code\issue-9172-suite360-workspace>

@subham25997
Copy link
Author

subham25997 commented Aug 29, 2024

suite360-workspace.zip

Please follow the following steps to reproduce it. Please try with the attached zip folder, not the previous one.

  • Tag and export the component to remote scope by using:
    bit tag -m "message" --build and bit export

  • After this, do some changes in component and tag it again using:
    bit tag -m "message" --build

Then you'll see this issue.

@Jinjiang
Copy link
Member

Jinjiang commented Aug 30, 2024

I've tried the new one again. It worked as well. Maybe there are some other factors caused this error.🤔

Would you mind sharing the output of bit update (just share the option list, don't update them at first)?

And also would like to double-check with you the bit envs output if you don't mind.

Another thing you can try is randomly removing some components and run bit tag or bit build --include-tag to see whether it still get the same errors.

Thanks.

@subham25997
Copy link
Author

subham25997 commented Aug 30, 2024

@Jinjiang

**bit update** gives

Root policies
    ○ @bitdev/general.envs.bit-env                       (runtime)   ^1.0.8 ❯ ^1.0.13

    ○ @bitdev/vue.dev-services.linter.vue-eslint-config  (runtime)  ^0.0.10 ❯ ^0.0.11

    ○ @bitdev/vue.dev-services.preview.vue-docs-template (runtime)  ^0.0.10 ❯ ^0.0.11

    ○ @bitdev/vue.dev-services.preview.vue-mounter       (runtime)   ^0.0.8 ❯ ^0.0.9

    ○ @bitdev/vue.envs.vue-base-env                      (runtime)  ^1.0.13 ❯ ^1.0.14

    ○ @mdx-js/mdx                                        (runtime)   1.6.22 ❯ 3.0.1   because of suite360/envs/[email protected]
    ○ @mdx-js/react                                      (runtime)   1.6.22 ❯ 3.0.1   because of suite360/envs/[email protected]
    ○ @testing-library/vue                               (runtime)   ^8.0.3 ❯ ^8.1.0  because of suite360/envs/[email protected]
    ○ @types/node                                        (runtime) 20.12.10 ❯ 22.5.1  because of suite360/envs/[email protected]
    ○ @types/react                                       (runtime)  18.2.23 ❯ 18.3.4  because of suite360/envs/[email protected]       
    ○ @types/react-dom                                   (runtime)  ^18.2.5 ❯ ^18.3.0 because of suite360/envs/[email protected]       
    ○ @vitejs/plugin-vue                                 (runtime)   ^5.1.2 ❯ ^5.1.3
    ○ @vitest/coverage-v8                                (runtime)   ^2.0.3 ❯ ^2.0.5  because of suite360/envs/[email protected]       
    ○ eslint                                             (runtime)   8.56.0 ❯ 9.9.1   because of suite360/envs/[email protected]       
    ○ jsdom                                              (runtime)  ^24.0.0 ❯ ^25.0.0 because of suite360/envs/[email protected]       
    ○ less                                               (runtime)   ^4.1.3 ❯ ^4.2.0  because of suite360/envs/[email protected] 

bit envs gives,

┌───────────────────────────────────────┬───────────────────────────────────┐
│ component                             │ env                               │
├───────────────────────────────────────┼───────────────────────────────────┤
│ suite360/apps/[email protected]          │ suite360/envs/[email protected]    │
├───────────────────────────────────────┼───────────────────────────────────┤
│ suite360/apps/[email protected]    │ suite360/envs/[email protected]    │
├───────────────────────────────────────┼───────────────────────────────────┤
│ suite360/core/[email protected]    │ suite360/envs/[email protected]    │
├───────────────────────────────────────┼───────────────────────────────────┤
│ suite360/core/[email protected] │ suite360/envs/[email protected]    │
├───────────────────────────────────────┼───────────────────────────────────┤
│ suite360/core/[email protected]  │ suite360/envs/[email protected]    │
├───────────────────────────────────────┼───────────────────────────────────┤
│ suite360/envs/[email protected]        │ bitdev.general/envs/[email protected] │
├───────────────────────────────────────┼───────────────────────────────────┤
│ suite360/envs/[email protected]    │ bitdev.vue/[email protected]          │
├───────────────────────────────────────┼───────────────────────────────────┤
│ suite360/layouts/[email protected] │ suite360/envs/[email protected] 

@Jinjiang
Copy link
Member

Jinjiang commented Aug 30, 2024

I see. Would you mind updating only @bitdev/general.envs.bit-env from 1.0.8 to 1.0.13 and try to build again?

Also, do you meet the same build error if you just start from a new workspace with an clean my-vue-env, my-vue-wrapper, and a newly created Vue component? pseudo commands:

bit new vue my-vue-workspace ...
cd my-vue-workspace
# then install and compile necessarily
bit create vue ui/my-button
# then install and compile necessarily
bit build --include-tag

Thanks.

@subham25997
Copy link
Author

In the beginning, I didn't get this issue. Okay let me try with this and will let you know.

@subham25997
Copy link
Author

subham25997 commented Aug 30, 2024

I updated and built it, but still getting this issue:

image

@subham25997
Copy link
Author

subham25997 commented Aug 30, 2024

@Jinjiang Is it something related to capsules path? I changed the capsules path a few days ago, using command:

bit config set capsules_root_base_dir "my-new-path" and also I am getting these warning messages:

image

@Jinjiang
Copy link
Member

Jinjiang commented Aug 30, 2024

@subham25997 this warning should be fine. but speaking of the capsule path, i'm not sure about that. technically the only chance to affect the build result might be somewhere with race-condition by hashes indirectly related to the capsule path? I haven't found this case yet.

@subham25997
Copy link
Author

@Jinjiang Can you change the default capsule path in your system and try to reproduce this issue?

@Jinjiang
Copy link
Member

Jinjiang commented Sep 2, 2024

I actually have tried multiple different workspace paths which have different corresponding capsule hashes. So far I didn't reproduce the issue yet.

@Jinjiang
Copy link
Member

Jinjiang commented Sep 9, 2024

Update: Good news, I've reproduced it in another casual component. Hopefully this time it could be fixed. Will keep you posted.

@Jinjiang
Copy link
Member

Jinjiang commented Sep 10, 2024

New bitdev.vue/vue-env has been released (v1.1.5) which should have fixed this issue. Please have a check. 🙏

For existing custom vue env, you can try to:

  1. update its dependency @bitdev/vue.envs.vue-modern-env to the latest (v1.0.21)
  2. if it also has dependency @bitdev/vue.dev-services.preview.vue-vite-preview, update it to the latest as well (v0.0.16)

You can do above by bit install xxx or bit update.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants