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

Typescript generation script fails to run when publishing shell version #12147

Closed
jordojordo opened this issue Oct 4, 2024 · 4 comments · Fixed by #12176
Closed

Typescript generation script fails to run when publishing shell version #12147

jordojordo opened this issue Oct 4, 2024 · 4 comments · Fixed by #12176

Comments

@jordojordo
Copy link
Member

jordojordo commented Oct 4, 2024

Describe the bug

When attempting to build an extension using the latest rc version of the @rancher/shell library (example for release-2.8 version 1.2.5-rc.1 ) the build will fail with this error:

 error  in /home/runner/work/2.8-extension/2.8-extension/node_modules/@rancher/shell/initialize/layouts.ts

ERROR in /home/runner/work/2.8-extension/2.8-extension/node_modules/@rancher/shell/initialize/layouts.ts(1,35):
1:35 Could not find a declaration file for module '@shell/utils/nuxt'. '/home/runner/work/2.8-extension/2.8-extension/node_modules/@rancher/shell/utils/nuxt.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/rancher__shell` if it exists or add a new declaration (.d.ts) file containing `declare module '@shell/utils/nuxt';`
  > 1 | import { sanitizeComponent } from '@shell/utils/nuxt';
      |                                   ^
    2 | import blank from '@shell/layouts/blank.vue';
    3 | import defaultLayout from '@shell/layouts/default.vue';
    4 | import home from '@shell/layouts/home.vue';

Example build action.

To Reproduce

  • Create an extension with the legacy-v1-pre-release tag or pin the @rancher/version to 1.2.5.-rc.1
  • Run yarn build-pkg <extension-pkg-name>

Result

Extension fails to build due to a type issue

Additional context

Update: This happens for each version of @rancher/shell, it appears that the node_modules/.bin directory no longer exists

This appears to be caused by the typegen.sh script not finding the tsc binary during the publish action:

https://github.com/rancher/dashboard/actions/runs/11128727581/job/30924140033#step:8:15

@github-actions github-actions bot added the QA/dev-automation Issues that engineers have written automation around so QA doesn't have look at this label Oct 4, 2024
@jordojordo jordojordo changed the title Extension with latest @rancher/shell rc version for 2.8 fail to build Typescript generation script fails to run when publishing shell version Oct 8, 2024
@jordojordo jordojordo self-assigned this Oct 8, 2024
@aalves08
Copy link
Collaborator

aalves08 commented Oct 9, 2024

/backport 2.9.3

Copy link
Contributor

github-actions bot commented Oct 9, 2024

Not creating port issue, milestone 2.9.3 does not exist or is not an open milestone

@aalves08
Copy link
Collaborator

aalves08 commented Oct 9, 2024

/backport v2.8.9

@aalves08
Copy link
Collaborator

aalves08 commented Oct 9, 2024

/backport v2.9.3

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

Successfully merging a pull request may close this issue.

2 participants