Skip to content

fix(@angular-devkit/build-angular): shim node events builtin for dev server #13725

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

Closed
wants to merge 1 commit into from

Conversation

clydin
Copy link
Member

@clydin clydin commented Feb 20, 2019

The dev server requires a node 'events' builtin shim to function. The dev server as written only currently works with package managers that hoist the events shim package to an accessible location. Hoisting is unfortunately not standardized and the assumption within the dev server will not hold true for all package managers. The actual code is only accessed when hmr is enabled which allows the 'events' import to be ignored in the non-hmr case.

Closes #13680

@clydin clydin force-pushed the fix-pnpm branch 2 times, most recently from 17cae38 to a627649 Compare February 20, 2019 20:24
@clydin clydin requested a review from filipesilva February 20, 2019 20:25
@clydin clydin added the target: major This PR is targeted for the next major release label Feb 20, 2019
…server

The dev server requires a node 'events' builtin shim to function.  The dev server as written only currently works with package managers that hoist the `events` shim package to an accessible location.  Hoisting is unfortunately not standardized and the assumption within the dev server will not hold true for all package managers.

Closes angular#13680
Copy link
Contributor

@filipesilva filipesilva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sounds like the kind of thing that should be fixed on the webpack dev server.

We can work around it here while it get fixed, but this isn't a workaround we should keep around indefinitely because it can lead to user apps working on serve but not on prod.

Is there a tracking issue on the webpack dev server that we can follow and reference here?

@clydin
Copy link
Member Author

clydin commented Mar 6, 2019

Closing; as I am attempting to get this addressed directly in Webpack.

@clydin clydin closed this Mar 6, 2019
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 12, 2019
@clydin clydin deleted the fix-pnpm branch January 9, 2020 16:37
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
target: major This PR is targeted for the next major release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

support of pnpm when installing a new app
3 participants