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

[doc issue] Typescript walkthrough missing dependency @ui5/builder #157

Closed
crater2150 opened this issue Sep 6, 2024 · 6 comments
Closed
Assignees
Labels
not-doc-issue Reported issue is not a documentation issue.

Comments

@crater2150
Copy link

Issue description

When following the Typescript walkthrough, after "Step 2" it is no longer possible to run npm start, as it fails with the error

Failed to load task repository. Missing dependency to '@ui5/builder'? Error: Cannot find package '@ui5/builder' imported from <app root dir>/node_modules/@ui5/project/lib/graph/ProjectGraph.js

The problem seems to be fixable with npm install @ui5/builder --save-dev, which is not mentioned in the documentation. Should this work without that step?

Feedback Type (Optional)

content gaps

Page Title on SAP Help Portal (prefilled)

Step 2: Bootstrap (TypeScript)

Page URL on SAP Help Portal (prefilled)

https://ui5.sap.com/#/topic/32b14d88bd484cd7b941aae37180f732

@KvM2
Copy link
Contributor

KvM2 commented Sep 6, 2024

Hi @crater2150 , thanks for your contribution! We'll look into it and get back to you.

@KlattG
Copy link
Contributor

KlattG commented Sep 10, 2024

Hi @crater2150 , have you followed all the tutorial steps in the correct order? In Step 1 you are required to run
npm install --save-dev @ui5/cli .
This should have prevented the problem. Does the problem get fixed with this input?

@crater2150
Copy link
Author

I just reran all commands from the tutorial on another machine, the error still occurs. I also re-ran npm install --save-dev @ui5/cli. Curiously, according to package-lock.json, the @ui5/builder package is installed, but in node_modules/@ui5/cli/node_modules/@ui5/builder, while installing it manually will put it in node_modules/@ui5/builder, thus fixing the problem. So this is probably a packaging issue, not a documentation issue.

I've attached package-lock.pre.json (state before running npm install -D '@ui5/builder') and package-lock.post.json (state afterwards).
package-lock.pre.json
package-lock.post.json

@flovogt
Copy link

flovogt commented Sep 17, 2024

Hi @crater2150,
thanks a lot for reaching out to us. I guess its a mismatch between lock file and node modules.

Could you please delete:

  • package-lock.json in your project
  • node_modules folder in your project

Afterwards execute a npm i in your project.

@crater2150
Copy link
Author

Hi @flovogt,
As I said, I reran all commands from the tutorial on a different PC, so without a preexisting package-lock.json. I just noticed I mixed up the pre- and post manual install lockfiles, I'm sorry if that caused confusion.

But I have good news, when I tried to reproduce the issue just now, everything worked after step 2. I'm not sure what changed, the lock file only differs in some version numbers and I started from an empty directory like last time 🤷

@flovogt
Copy link

flovogt commented Sep 21, 2024

@crater2150 Happy to see your setup works and thanks a lot for opening this issue here. This will help many devs in future.

@OlMue OlMue added the not-doc-issue Reported issue is not a documentation issue. label Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
not-doc-issue Reported issue is not a documentation issue.
Projects
None yet
Development

No branches or pull requests

5 participants