Spread operator in node_module causes bundling failure
See original GitHub issueI’m using stage-0 and importing redux-throttle and getting an error that seems to be related to the spread operator.
C:\projects\myapp\node_modules\redux-throttle\src\index.js:52:17: Unexpected token (52:17)
[0] 50 | } else if (typeof shouldThrottle === 'object') {
[0] 51 | wait = shouldThrottle.wait || defaultWait
[0] > 52 | options = {...defaultThrottleOption, ...shouldThrottle}
[0] | ^
[0] 53 | }
[0] 54 |
[0] 55 | throttled[action.type] = throttle(next, wait, options)
This seems to be the same issue seen in https://github.com/parcel-bundler/parcel/issues/304, only I am already using stage-0 and have additionally tried the recommendations on that issue without luck.
🌍 Your Environment
| Software | Version(s) |
|---|---|
| Parcel | 1.6.1 |
| Node | 8.9.1 |
| npm/Yarn | 1.3.2 (yarn) |
| Operating System | Windows 7 x64 |
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:7 (2 by maintainers)
Top Results From Across the Web
object spread operator detected as an error on webpack for ...
I'm trying to upgrade my application's node version from node6 to node8.6 which supports spread operator natively, all works fine until I ...
Read more >Liferay 7 GA5 - NPM React Portlet Dependency Issue
I have used babel plugin: babel-plugin-transform-object-rest-spread into the ... gets successful but still getting an error while bundling redux@3.7.2.
Read more >API - esbuild
If the entry names template had been just [name] instead, bundling would have failed because there would have been two output files with...
Read more >Enable spread operator using babel/preset-env in node ...
React Native: How do you enable async functions? ... bundling failed: Error: Unable to resolve module `@babel/runtime/helpers/interopRequireDefault` from `index.
Read more >Node.js v19.3.0 Documentation
stackTraceLimit; error.cause; error.code; error.message; error.stack ... the error instance. operator <string> The operator property on the error instance.
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

Have the same issue with spread operator in a node module:
Babel preset is installed and working fine with object spreading in the project code. Any suggestions here?
Same problem. Cleaned my cache to no avail.
The node_module code is symlinked (monorepo) and exposed in package.json through both “source” and “jsnext:main”