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.

Please choose a version of "babel-plugin-named-asset-import" in custom react-scripts package

See original GitHub issue

I’m trying to maintain a separate fork of react-scripts@next with some webpack configuration changes that I want to use without ejecting. I’m noticing that if I branch from the commit react-scripts@2.0.0-next.a671462c then change the package JSON information and publish to my specific npm account, when I try to install my own version I get prompted with:

Please choose a version of “babel-plugin-named-asset-import” from this list: 1.0.0-next.b2fd8db8 1.0.0-next.a671462c 1.0.0-next.66cc7a90

I picked a671462c since it’s the same hash as the scripts version is branched out of, but I end up with Error: Cannot find module 'react-dev-utils/browsersHelper'.

I know this may not be supported by you guys directly, but I was wondering if anyone could give me some insight on how to fix this.

Thanks in advance!

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
sowhatdoidocommented, Sep 6, 2018

@jcmandersson, I didn’t solve it.

The issue is that the package dependencies are being automatically updated when you deploy via lerna to match one another - if you look at the dependency list after installing CRA’s next versus a fork of next, they are completely different. So essentially what you would need to do is update every package (not just react-scripts) to your own name in the various package.json files, update the requires to pull in your version of said package, then do a publish to your own npm.

I felt like that was too many hurdles to deal with and would make merging any upstream changes challenging, so I decided to go with a different route.

1reaction
jcmanderssoncommented, Sep 10, 2018

Thanks @sowhatdoido

I took a completely different route with next.js and created my own boilerplate repo. Not ideal since it will be hard to keep the boilerplate code (like webpack config) updated for old projects. But good enough for me right now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

template not provided using create-react-app error/start script ...
A template was not provided. This is likely because you're using an outdated version of create-react-app. Please note that global installs of ...
Read more >
oh-custom-react-scripts - npm package - Snyk
react -scripts. This package includes scripts and configuration used by Create React App. Please refer to its documentation: Getting Started – ...
Read more >
Customizing Сreate React App without Eject - 2muchcoffee
Publishing custom react-scripts to npm: Before publishing to npm, you need to change the value of the “name” key in the “package.json” file...
Read more >
react-dev-utils | Yarn - Package Manager
readme. react-dev-utils. This package includes some utilities used by Create React App. Please refer to its documentation:.
Read more >
Migrating from 1.x to 2.0.3 - create-react-app - Breword 文档集合
3.0.0 and Newer Versions. Please refer to CHANGELOG.md for the newer versions. ... (@otaviopace). babel-plugin-named-asset-import , react-scripts.
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