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

Estraverse 5.2.0 is not compatible with current ui5-builder #391

Closed
1 of 6 tasks
MrUnkei opened this issue Aug 6, 2020 · 10 comments
Closed
1 of 6 tasks

Estraverse 5.2.0 is not compatible with current ui5-builder #391

MrUnkei opened this issue Aug 6, 2020 · 10 comments
Labels
bug Something isn't working module/ui5-builder Related to the UI5 Builder module

Comments

@MrUnkei
Copy link

MrUnkei commented Aug 6, 2020

Expected Behavior

The build work

Current Behavior

Error message appear

Steps to reproduce the issue

On a repo with @ui5/cli@^2.0.0 and with ui5 build xxxx works

  1. remove all your dependencies and delete package-lock.json file
  2. npm i to use latest version of your dependencies
  3. run your ui5 build xxxx

Context

  • UI5 Module Version (output of ui5 --version when using the CLI): {...}
  • Node.js Version: tested on 10.19.0 and 12.18.2
  • npm Version: {...}
  • OS/Platform: {...}
  • Browser (if relevant): {...}
  • Other information: {...}

Affected components (if known)

Log Output / Stack Trace

Error Message:
taskRepository: Failed to require task module for generateComponentPreload: unknown estree node type 'ChainExpression', new syntax?

Stack Trace:
Error: taskRepository: Failed to require task module for generateComponentPreload: unknown estree node type 'ChainExpression', new syntax?
    at getTask (/XXXX/node_modules/@ui5/builder/lib/tasks/taskRepository.js:36:9)
    at addTask (/XXXX/node_modules/@ui5/builder/lib/types/application/ApplicationBuilder.js:85:12)
    at /XXXX/node_modules/@ui5/builder/lib/types/AbstractBuilder.js:205:11
    at process._tickCallback (internal/process/next_tick.js:68:7)

More information

[email protected] has been release yesterday and introduce ChainExpression
estools/estraverse#113

@RandomByte
Copy link
Member

@danielang
Copy link

When a new version of the @ui5/cli will be realesed where the version of estraverse will be fixed?

Currently this will braek our buildserver and fresh installs of our dev environment/project. We use the exact version 2.3.1 of the @ui5/cli.

Thank you.

@MrUnkei
Copy link
Author

MrUnkei commented Aug 7, 2020

Hi @danielang
on our side, we have a workaround, we had [email protected] in our devDependencies, until to have a new version of @ui5/builder

@RandomByte
Copy link
Member

When a new version of the @ui5/cli will be realesed where the version of estraverse will be fixed?

Currently this will braek our buildserver and fresh installs of our dev environment/project. We use the exact version 2.3.1 of the @ui5/cli.

@danielang This should not happen. @ui5/cli comes with an npm-shrinkwrap.json which only allows [email protected] to be installed for the tooling.

I also could not reproduce any issues with the CLI in the openui5-sample-app after removing node_modules and package-lock.json and reinstalling all dependencies (including @ui5/cli).

How do you install @ui5/cli?

@danielang
Copy link

@RandomByte and @MrUnkei
thank you for your replies.
We are using a yarn workspace. So we install our dependencies with yarn.

A simple research shows that yarn does not support the npm-shrinkwrap file: migrating-from-npm:

If you are using an npm-shrinkwrap.json file right now, be aware that you may end up with a different set of dependencies. Yarn does not support npm shrinkwrap files as they don’t have enough information in them to power Yarn’s more deterministic algorithm. If you are using a shrinkwrap file it may be easier to convert everyone working on the project to use Yarn at the same time. Simply remove your existing npm-shrinkwrap.json file and check in the newly created yarn.lock file.

What can we do?

@RandomByte
Copy link
Member

I see. In that case, the yarn.lock file should prevent you from running into this issue. In case you have already updated this lockfile or you don't use it, you can also use resolutions to achieve something similar to what @MrUnkei explained.

@RandomByte
Copy link
Member

Anyways, I guess we'll also do a @ui5/cli release for those Yarn users once we have a new @ui5/builder version. Thank you for the feedback.

@danielang
Copy link

Thank you too!

@RandomByte
Copy link
Member

Pending release

@RandomByte RandomByte reopened this Aug 10, 2020
@RandomByte
Copy link
Member

Resolved with @ui5/builder v2.0.7, which is contained in @ui5/cli v2.3.2.

@RandomByte RandomByte transferred this issue from SAP/ui5-builder Nov 20, 2020
@RandomByte RandomByte added bug Something isn't working module/ui5-builder Related to the UI5 Builder module labels Nov 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working module/ui5-builder Related to the UI5 Builder module
Projects
None yet
Development

No branches or pull requests

3 participants