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

Update sanitize-html from 2.1.0 to 2.12.1 fails. Module parse failed: Unexpected token. #663

Open
ricdev opened this issue Apr 17, 2024 · 5 comments
Labels

Comments

@ricdev
Copy link

ricdev commented Apr 17, 2024

To Reproduce

Step by step instructions to reproduce the behavior:

  1. npm install
  2. npm run build

Expected behavior

Clean build.

Describe the bug

Screen Shot 2024-04-17 at 1 16 33 PM

Details

Version of Node.js:

16.18.1

Server Operating System:

MacOs Monterey 12.5.1. Github Actions script.

Additional context:

Relates to #592 (comment) and #592

@ricdev ricdev added the bug label Apr 17, 2024
@BoDonkey
Copy link
Contributor

Two comments:

  1. Node16 is past the EOL - you should upgrade to 18 or 20. This might solve your problem.
  2. I'm not sure what the build script is. It isn't part of the core repo.
    I thought we had done something to pin the version of htmlparser2, but I can't find it in the changelog. My latest version is installing 8.0.1.

@josephrexme
Copy link

josephrexme commented Apr 17, 2024

I'm seeing this same issue on node 20.8.0.

The problem occurred for me while trying sanitize-html@2.13.0

@BoDonkey
Copy link
Contributor

Can you provide better steps to replicate the error? Again, there isn't a build script.

@Insomniak313
Copy link

As state here the issue (I'm having the same one) is your webpack version.
You should update to v5. However, im not really satisfied with the author's answer and I'm wondering whether htmlparser2 should have a devDependency on webpack ^5

@BoDonkey
Copy link
Contributor

Thanks @Insomniak313! - I thought it was something with the version of htmlparser2.

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

No branches or pull requests

4 participants