tradle / rn-nodeify

hack to allow react-native projects to use node core modules, and npm modules that use them
MIT License
615 stars 112 forks source link

Polite github url #62

Closed mactkg closed 6 years ago

mactkg commented 6 years ago

Fix stacking issue while installing react-native-http

Error Log:

(*'-') < cat ~/.npm/_logs/2018-02-03T06_23_59_721Z-debug.log
0 info it worked if it ends with ok
1 verbose cli [ '/Users/kenta/.anyenv/envs/ndenv/versions/v9.5.0/bin/node',
1 verbose cli   '/Users/kenta/.anyenv/envs/ndenv/versions/v9.5.0/bin/npm',
1 verbose cli   'install',
1 verbose cli   '--save',
1 verbose cli   'tradle/react-native-http#834492d' ]
2 info using npm@5.6.0
3 info using node@v9.5.0
4 verbose npm-session 30833c6df2c74f16
5 silly install loadCurrentTree
6 silly install readLocalPackageData
7 info lifecycle react-native-http@1.0.0~prepack: react-native-http@1.0.0
8 silly fetchPackageMetaData error for github:tradle/react-native-http#834492d Non-registry package missing package.json: github:tradle/react-native-http#834492d.
9 verbose stack Error: Non-registry package missing package.json: github:tradle/react-native-http#834492d.
9 verbose stack     at BB.join (/Users/kenta/.anyenv/envs/ndenv/versions/v9.5.0/lib/node_modules/npm/node_modules/pacote/lib/finalize-manifest.js:160:23)
9 verbose stack     at tryCatcher (/Users/kenta/.anyenv/envs/ndenv/versions/v9.5.0/lib/node_modules/npm/node_modules/bluebird/js/release/util.js:16:23)
9 verbose stack     at Holder$5._callFunction (eval at generateHolderClass (/Users/kenta/.anyenv/envs/ndenv/versions/v9.5.0/lib/node_modules/npm/node_modules/bluebird/js/release/join.js:92:16), <anonymous>:14:44)
9 verbose stack     at Holder$5.checkFulfillment (eval at generateHolderClass (/Users/kenta/.anyenv/envs/ndenv/versions/v9.5.0/lib/node_modules/npm/node_modules/bluebird/js/release/join.js:92:16), <anonymous>:29:30)
9 verbose stack     at Promise.eval (eval at thenCallback (/Users/kenta/.anyenv/envs/ndenv/versions/v9.5.0/lib/node_modules/npm/node_modules/bluebird/js/release/join.js:14:16), <anonymous>:6:20)
9 verbose stack     at Promise._settlePromise (/Users/kenta/.anyenv/envs/ndenv/versions/v9.5.0/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:566:21)
9 verbose stack     at Promise._settlePromise0 (/Users/kenta/.anyenv/envs/ndenv/versions/v9.5.0/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:614:10)
9 verbose stack     at Promise._settlePromises (/Users/kenta/.anyenv/envs/ndenv/versions/v9.5.0/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:693:18)
9 verbose stack     at Promise._fulfill (/Users/kenta/.anyenv/envs/ndenv/versions/v9.5.0/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:638:18)
9 verbose stack     at Object.<anonymous> (/Users/kenta/.anyenv/envs/ndenv/versions/v9.5.0/lib/node_modules/npm/node_modules/bluebird/js/release/nodeback.js:42:21)
9 verbose stack     at Object.emit (events.js:165:20)
9 verbose stack     at Object.Parser.on._ (/Users/kenta/.anyenv/envs/ndenv/versions/v9.5.0/lib/node_modules/npm/node_modules/tar/lib/parse.js:75:14)
9 verbose stack     at Object.emit (events.js:160:13)
9 verbose stack     at Object.[emit] (/Users/kenta/.anyenv/envs/ndenv/versions/v9.5.0/lib/node_modules/npm/node_modules/tar/lib/parse.js:229:12)
9 verbose stack     at Object.[maybeEnd] (/Users/kenta/.anyenv/envs/ndenv/versions/v9.5.0/lib/node_modules/npm/node_modules/tar/lib/parse.js:338:17)
9 verbose stack     at Object.[consumeChunk] (/Users/kenta/.anyenv/envs/ndenv/versions/v9.5.0/lib/node_modules/npm/node_modules/tar/lib/parse.js:346:21)
10 verbose cwd /Users/kenta/local/src/***
11 verbose Darwin 16.7.0
12 verbose argv "/Users/kenta/.anyenv/envs/ndenv/versions/v9.5.0/bin/node" "/Users/kenta/.anyenv/envs/ndenv/versions/v9.5.0/bin/npm" "install" "--save" "tradle/react-native-http#834492d"
13 verbose node v9.5.0
14 verbose npm  v5.6.0
15 error code ENOPACKAGEJSON
16 error package.json Non-registry package missing package.json: github:tradle/react-native-http#834492d.
17 error package.json npm can't find a package.json file in your current directory.
18 verbose exit [ 1, true ]
mvayngrib commented 6 years ago

@mactkg thanks for the PR! However, according to npm docs, username/repo#commitish is a valid github dependency url. I do see an issue with pacote that might be related, about misreported errors. Can you check why pacote actually throws this error? Because "Non-registry package missing package.json" is obviously not true. There's definitely a package.json in react-native-http :)

mactkg commented 6 years ago

Thanks for your reply! Hmm, the syntax seems to be valid. There is one more thing that bothers me. I'm wondering if a repo url in a package.json of react-native-http is wrong.

The line is here: https://github.com/tradle/react-native-http/blob/834492dbc792b1dec8ec8f0a1c9671f640339f01/package.json#L24 Should a url of the line be https...?

Thanks!

2018年2月3日(土) 23:13 Mark Vayngrib notifications@github.com:

@mactkg https://github.com/mactkg thanks for the PR! However, according to npm docs https://docs.npmjs.com/files/package.json#github-urls, username/repo#commitish is a valid github dependency url. I do see an issue https://github.com/npm/npm/issues/19466#issuecomment-360127282 with pacote that might be related, about misreported errors. Can you check why pacote actually throws this error? Because "Non-registry package missing package.json" is obviously not true. There's definitely a package.json in react-native-http :)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/tradle/rn-nodeify/pull/62#issuecomment-362811369, or mute the thread https://github.com/notifications/unsubscribe-auth/AAK48vGcYMBaFwnJ-uRLd8bHF6kmHz5-ks5tRGl2gaJpZM4R4EUT .

mvayngrib commented 6 years ago

@mactkg you're right, that url is all kinds of wrong. It should be https://github.com/tradle/react-native-http (the repo location moved at some point, i guess i forgot to change this field)

mactkg commented 6 years ago

okay, so this repo doesn't cause a problem! I'll close this PR later. (I'm out now, so I close later. It's ok if anyone can close this)

2018年2月3日(土) 23:28 Mark Vayngrib notifications@github.com:

@mactkg https://github.com/mactkg you're right, that url is all kinds of wrong. It should be https://github.com/tradle/react-native-http (the repo location moved at some point, i guess i forgot to change this field)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/tradle/rn-nodeify/pull/62#issuecomment-362813758, or mute the thread https://github.com/notifications/unsubscribe-auth/AAK48valakYGXAtDw7YN0aJfTi3nKxMmks5tRG0ngaJpZM4R4EUT .