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

Uncaught TypeError: Cannot redefine property: name #14

Closed
4 tasks done
speed4 opened this issue Jul 11, 2024 · 2 comments
Closed
4 tasks done

Uncaught TypeError: Cannot redefine property: name #14

speed4 opened this issue Jul 11, 2024 · 2 comments
Labels
🤷 no/invalid This cannot be acted upon 👎 phase/no Post cannot or will not be acted on

Comments

@speed4
Copy link

speed4 commented Jul 11, 2024

Initial checklist

Affected packages and versions

5.1.3

Link to runnable example

No response

Steps to reproduce

Use chrome 42 to open the web page containing [email protected]

"Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2309.0 Safari/537.36"

Expected behavior

The console does not report any errors

Actual behavior

Uncaught TypeError: Cannot redefine property: name

Object.defineProperty(visit, 'name', {
value: 'node (' + color(node.type + (name ? '<' + name + '>' : '')) + ')'
});

Affected runtime and version

[email protected]

Affected package manager and version

[email protected]

Affected OS and version

No response

Build and bundle tools

webpack

@github-actions github-actions bot added 👋 phase/new Post is being triaged automatically 🤞 phase/open Post is being triaged manually and removed 👋 phase/new Post is being triaged automatically labels Jul 11, 2024
@ChristianMurphy
Copy link
Member

Welcome @speed4! 👋
Sorry you ran into a spot of trouble.

The syntax-tree packages are designed to run on Node.js 16+.
It can also be compiled to target the web, for a web target it should work on recent versions of evergreen browsers.

Chrome 42 is over 8 years old now, and hasn't been supported in years.
My suggestion would be upgrade your Chrome version, it is very insecure.

If you still want to try to make things compatible with unsupported browsers.
You are welcome to try out various transpilers like babel and swc, and polyfills like core.js.

Understand that Chrome 42 isn't a target/supported platform of unist-util-parents, so this isn't a bug.

@ChristianMurphy ChristianMurphy closed this as not planned Won't fix, can't repro, duplicate, stale Jul 11, 2024
@ChristianMurphy ChristianMurphy added the 🤷 no/invalid This cannot be acted upon label Jul 11, 2024

This comment has been minimized.

@github-actions github-actions bot added 👎 phase/no Post cannot or will not be acted on and removed 🤞 phase/open Post is being triaged manually labels Jul 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤷 no/invalid This cannot be acted upon 👎 phase/no Post cannot or will not be acted on
Development

No branches or pull requests

2 participants