Unexpected token: name (onClickOutside)
See original GitHub issueGetting an error on webpack production build.
Unexpected token: name (onClickOutside) [./node_modules/react-onclickoutside/index.js:92,0]
It seems to be fixed in react-onclickoutside
version 6.1.0
as mentioned here.
https://github.com/Pomax/react-onclickoutside/issues/195
I noticed this has recently been downgraded, but version 0.57.0
won’t build for me and others.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:6
- Comments:42 (19 by maintainers)
Top Results From Across the Web
Cannot fix "Unexpected token name «i», expected punc «;»"
According to forums, the problem is caused because UglifyJs does not support ES6 so I tried to solve it with these links: this...
Read more >syntaxerror: unexpected token 'export' uuid - You.com | The AI ...
This means, that a file is not transformed through TypeScript compiler, e.g. because it is a JS file with TS syntax, or it...
Read more >react-onclickoutside-es6 - npm package - Snyk
Learn more about react-onclickoutside-es6: package health score, popularity, security, maintenance, ... Uncaught SyntaxError: Unexpected token import.
Read more >Magento 2.4.2: SyntaxError: Unexpected token: name (url)
It appears you have some Javascript that is using ES6 or newer syntax and the version of UglifyJS does not support this.
Read more >react-bootstrap-typeahead - npm
By default, the key is named label , but you can specify a ... You may have unexpected results if your data contains...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’m experiencing the same issue with the
create-react-app
stack. It can’t build my application, fails with the message:@martijnrusschen Seems to me this is a different problem you’ve fixed with downgrading
react-onclickoutside
to 6.0.0.The problem I, @tadjohnston and @josegers have is that,
./node_modules/react-onclickoutside/index.js
in v6.0.0 is not transpiled and has native ES6 class defined. This is sth that has been fixed inreact-onclickoutside v.6.1.0
, but you’re using a lower version.