question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Impact babel-plugin-transform-replace-object-assign

See original GitHub issue

i getting the following error while importing DateRangePicker lib.

Configuring module specifier with a string is no longer supported. Configure with { “moduleSpecifier”: “object.assign” } instead of “object.assign”.

ERROR in ./node_modules/react-with-direction/dist/proptypes/brcast.js Module build failed (from ./node_modules/babel-loader/lib/index.js): Error: C:/work/POC/pq-client-develop/node_modules/react-with-direction/dist/proptypes/brcast.js: Configuring module specifier with a string is no longer supported. Configure with { "moduleSpecifier": "object.assign" } instead of "object.assign". at PluginPass.exit (C:\work\POC\pq-client-develop\node_modules\babel-plugin-transform-replace-object-assign\lib\index.js:23:19) at newFn (C:\work\POC\pq-client-develop\node_modules\babel-traverse\lib\visitors.js:276:21) at NodePath._call (C:\work\POC\pq-client-develop\node_modules\babel-traverse\lib\path\context.js:76:18) at NodePath.call (C:\work\POC\pq-client-develop\node_modules\babel-traverse\lib\path\context.js:48:17) at NodePath.visit (C:\work\POC\pq-client-develop\node_modules\babel-traverse\lib\path\context.js:117:8) at TraversalContext.visitQueue (C:\work\POC\pq-client-develop\node_modules\babel-traverse\lib\context.js:150:16) at TraversalContext.visitSingle (C:\work\POC\pq-client-develop\node_modules\babel-traverse\lib\context.js:108:19) at TraversalContext.visit (C:\work\POC\pq-client-develop\node_modules\babel-traverse\lib\context.js:192:19) at Function.traverse.node (C:\work\POC\pq-client-develop\node_modules\babel-traverse\lib\index.js:114:17) at traverse (C:\work\POC\pq-client-develop\node_modules\babel-traverse\lib\index.js:79:12) at File.transform (C:\work\POC\pq-client-develop\node_modules\babel-core\lib\transformation\file\index.js:516:35) at C:\work\POC\pq-client-develop\node_modules\babel-core\lib\transformation\pipeline.js:50:19 at File.wrap (C:\work\POC\pq-client-develop\node_modules\babel-core\lib\transformation\file\index.js:532:16) at Pipeline.transform (C:\work\POC\pq-client-develop\node_modules\babel-core\lib\transformation\pipeline.js:47:17) at transpile (C:\work\POC\pq-client-develop\node_modules\babel-loader\lib\index.js:50:20) at C:\work\POC\pq-client-develop\node_modules\babel-loader\lib\fs-cache.js:118:18 @ ./node_modules/react-with-styles/lib/withStyles.js 50:14-67 @ ./node_modules/react-dates/lib/components/CalendarMonth.js @ ./node_modules/react-dates/lib/index.js @ ./node_modules/react-dates/index.js @ ./src/js/components/CourseInfo/courseInfo.jsx @ ./src/js/components/CourseInfo/index.js @ ./src/js/components/index.js @ ./src/js/index.js @ multi (webpack)-dev-server/client?http://0.0.0.0:9000 ./src/js/index.js

i stuck by this.

Ref: https://github.com/newoga/babel-plugin-transform-replace-object-assign

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
ljharbcommented, Aug 2, 2018

I’m quite sure that’s the issue, so I’m going to close this.

0reactions
ljharbcommented, Aug 6, 2018

I’m not sure how this problem could occur; but any time you get a babel config error from inside node_modules, it’s that your babel config is broken (ie, it’s transpiling node_modules). There’s nothing that this package or i can really do to fix this from the consuming package side - all we could do is make a change to avoid that specific error, but it wouldn’t fix the root problem.

Read more comments on GitHub >

github_iconTop Results From Across the Web

babel-plugin-transform-replace-object-assign - npm
Allows you to provide custom implementation of Object.assign in babel builds. Latest version: 2.0.0, last published: 4 years ago.
Read more >
babel/plugin-transform-object-assign
Will only work with code of the form Object.assign or Object['assign'] . The following patterns are not supported: var { assign } =...
Read more >
babel-plugin-transform-replace-object-assign - Bundlephobia
Size of babel-plugin-transform-replace-object-assign v2.0.0 is 229.5 kB (minified), ... Bundlephobia helps you find the performance impact of npm packages.
Read more >
Why do I need to add dependencies' babel plugin to my project?
I can add to my project, of course, then I add another third party react component, which needs babel-plugin-transform-replace-object-assign ...
Read more >
babel-plugin-transform-object-assign examples - CodeSandbox
Learn how to use babel-plugin-transform-object-assign by viewing and forking example apps that make use of babel-plugin-transform-object-assign on CodeSandbox.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found