Browse files

Fix scoped modules

see #8623

Back in a days, one buggy patch sneaked into rnpm master. It was intended to fix `react-native-fbsdk` installation for version 0.1.0 (not required in version 0.3.0). Nowadays, we see that this patch break scoped modules `like/this`, so this PR fixes it (basically, reverting the patch).

**Test plan (required)**
- [x] Try to link unscoped react-native package
- [x] Try to link scoped react-native package
**Code formatting**

Look around. Match the style of the rest of the codebase. See also the simple [style guide](

For more info, see the ["Pull Requests" section of our "Contributing" guidelines](
Closes #9118

Differential Revision: D3648488

fbshipit-source-id: 1891086ac79a89c888631592c966a8b33fd9c9fd
  • Loading branch information...
1 parent 15bf2c5 commit 8ad748ac7d6c27e3d89706a5542e62fd088ba8d2 @Kureev Kureev committed with Facebook Github Bot 0 Aug 1, 2016
Showing with 1 addition and 1 deletion.
  1. +1 −1 local-cli/rnpm/core/src/config/index.js
@@ -31,7 +31,7 @@ exports.getProjectConfig = function getProjectConfig() {
exports.getDependencyConfig = function getDependencyConfig(packageName) {
const folder = path.join(process.cwd(), 'node_modules', packageName);
const rnpm = getRNPMConfig(
- path.join(process.cwd(), 'node_modules', packageName.split('/')[0])
+ path.join(process.cwd(), 'node_modules', packageName)
return Object.assign({}, rnpm, {

10 comments on commit 8ad748a

grabbou commented on 8ad748a Aug 1, 2016

An alternative would be to detect @ and in that case, use 0 and 1 after splitting, though I don't think that patch was widely used. We can wait and see if anyone complains.

Kureev commented on 8ad748a Aug 1, 2016

Fair point. Let do it as you said: we add if statement if somebody complain 👍


Link to the original PR @Kureev ? Would like to read about the issue

Kureev commented on 8ad748a Aug 1, 2016 edited

@satya164 issue #8623, pr #9118


@Kureev I meant the one about fbsdk in rnpm repo


@Kureev Thanks ❤️

Kerumen commented on 8ad748a Aug 1, 2016

@Kureev It's a shame that we cannot have the history of this as rnpm switched to read-only mode..

Kureev commented on 8ad748a Aug 1, 2016

@Kerumen It's a transition period. I hope we'll pass through it pretty fast.

Please sign in to comment.