-
Notifications
You must be signed in to change notification settings - Fork 24.8k
Closed
Labels
Resolution: LockedThis issue was locked by the bot.This issue was locked by the bot.Type: InvalidThis issue does not belong here. Applying this label will cause issue to be closed.This issue does not belong here. Applying this label will cause issue to be closed.
Description
Environment:
OS: Windows 10
Node: 8.12.0
Yarn: 1.9.4
npm: 3.10.9
Watchman: 4.9.4
Xcode: N/A
Android Studio: Version 3.1.0.0 AI-173.4720617
Packages: (wanted => installed)
react: 16.3.1 => 16.3.1
react-native: 0.55.4 => 0.55.4
Description
i can't solve that error , i have installed crypto , or upgrade it and reinstall it , still the same problem
//this is helpers.js
'use strict'
var jsonSafeStringify = require('json-stringify-safe')
var crypto = require('crypto')
var Buffer = require('safe-buffer').Buffer
var defer = typeof setImmediate === 'undefined'
? process.nextTick
: setImmediate
function paramsHaveRequestBody (params) {
return (
params.body ||
params.requestBodyStream ||
(params.json && typeof params.json !== 'boolean') ||
params.multipart
)
}
function safeStringify (obj, replacer) {
var ret
try {
ret = JSON.stringify(obj, replacer)
} catch (e) {
ret = jsonSafeStringify(obj, replacer)
}
return ret
}
function md5 (str) {
return crypto.createHash('md5').update(str).digest('hex')
}
function isReadStream (rs) {
return rs.readable && rs.path && rs.mode
}
function toBase64 (str) {
return Buffer.from(str || '', 'utf8').toString('base64')
}
function copy (obj) {
var o = {}
Object.keys(obj).forEach(function (i) {
o[i] = obj[i]
})
return o
}
function version () {
var numbers = process.version.replace('v', '').split('.')
return {
major: parseInt(numbers[0], 10),
minor: parseInt(numbers[1], 10),
patch: parseInt(numbers[2], 10)
}
}
exports.paramsHaveRequestBody = paramsHaveRequestBody
exports.safeStringify = safeStringify
exports.md5 = md5
exports.isReadStream = isReadStream
exports.toBase64 = toBase64
exports.copy = copy
exports.version = version
exports.defer = defer
Metadata
Metadata
Assignees
Labels
Resolution: LockedThis issue was locked by the bot.This issue was locked by the bot.Type: InvalidThis issue does not belong here. Applying this label will cause issue to be closed.This issue does not belong here. Applying this label will cause issue to be closed.