无法连接到开发服务器。确保满足以下条件:-节点服务器正在运行并且在同一网络上可用

时间:2019-02-24 17:02:00

标签: node.js expo cryptojs web3

我正在尝试解决加密错误。

https://gist.github.com/dougbacelar/29e60920d8fa1982535247563eb63766

引用链接。

Expo v31.0.0表示可能需要更改rn-cli.config.js,因此我更改了rn-cli.config.js代码。

const blacklist = require("metro-config/src/defaults/blacklist");

module.exports = {
  watchFolders: alternateRoots,
  resolver: {
    blacklistRE: blacklist
  },
  transformer: {
    babelTransformerPath: require.resolve("./scripts/transformer.js")
  }
};

/*
const extraNodeModules = require("node-libs-browser");

module.exports = {
  extraNodeModules
};

*/

跑纱

但是我更改了错误代码。

无法连接到开发服务器。

确保满足以下条件: -节点服务器正在运行并且在同一网络上可用-从react-native根目录运行'npm start' -在AppDelegate中正确设置了节点服务器URL -WiFi已启用,并与节点服务器连接到同一网络

URL:http://127.0.0.1:19003/node_modules/expo/AppEntry.bundle?platform=ios&dev=true&minify=false&hot=false&assetPlugin=%2FUsers%2Flucky%2FDesktop%2Ftest%2Fnode_modules%2Fexpo%2Ftools%2FhashAssetFiles.js

如何解决此错误?和“密码”错误

请给我很多答案。

package.json

{
  "main": "node_modules/expo/AppEntry.js",
  "scripts": {
    "start": "expo start",
    "android": "expo start --android",
    "ios": "expo start --ios",
    "eject": "expo eject"
  },
  "dependencies": {
    "@tradle/react-native-http": "^2.0.1",
    "browserify-zlib": "^0.1.4",
    "buffer": "^4.9.1",
    "dns.js": "^1.0.1",
    "events": "^1.1.1",
    "expo": "^32.0.0",
    "https-browserify": "0.0.1",
    "node-libs-browser": "^2.2.0",
    "process": "^0.11.10",
    "punycode": "^1.4.1",
    "react": "16.5.0",
    "react-native": "https://github.com/expo/react-native/archive/sdk-32.0.0.tar.gz",
    "react-native-crypto": "^2.1.2",
    "react-native-level-fs": "^3.0.1",
    "react-native-maps": "^0.23.0",
    "react-native-os": "^1.2.2",
    "react-native-randombytes": "^3.5.2",
    "react-native-tcp": "^3.3.0",
    "react-native-udp": "^2.5.0",
    "readable-stream": "^1.0.33",
    "stream-browserify": "^1.0.0",
    "string_decoder": "^0.10.31",
    "timers-browserify": "^1.4.2",
    "url": "^0.10.3",
    "util": "^0.10.4",
    "web3": "^1.0.0-beta.34"
  },
  "devDependencies": {
    "@babel/cli": "^7.2.3",
    "@types/react": "^16.8.4",
    "@types/react-native": "^0.57.38",
    "babel-preset-es2015": "^6.24.1",
    "babel-preset-expo": "^5.0.0",
    "jest-expo": "^32.0.0",
    "react-native-scripts": "^2.0.1",
    "react-native-typescript-transformer": "^1.2.11",
    "react-test-renderer": "^16.8.3",
    "rn-nodeify": "github:tradle/rn-nodeify",
    "typescript": "^3.3.3333"
  },
  "private": true,
  "compilerOptions": {
    "target": "es2015",
    "jsx": "react",
    "noEmit": true,
    "moduleResolution": "node"
  },
  "exclude": [
    "node_modules"
  ],
  "react-native": {
    "zlib": "browserify-zlib",
    "console": "console-browserify",
    "constants": "constants-browserify",
    "crypto": "react-native-crypto",
    "dns": "dns.js",
    "net": "react-native-tcp",
    "domain": "domain-browser",
    "http": "@tradle/react-native-http",
    "https": "https-browserify",
    "os": "react-native-os",
    "path": "path-browserify",
    "querystring": "querystring-es3",
    "fs": "react-native-level-fs",
    "_stream_transform": "readable-stream/transform",
    "_stream_readable": "readable-stream/readable",
    "_stream_writable": "readable-stream/writable",
    "_stream_duplex": "readable-stream/duplex",
    "_stream_passthrough": "readable-stream/passthrough",
    "dgram": "react-native-udp",
    "stream": "stream-browserify",
    "timers": "timers-browserify",
    "tty": "tty-browserify",
    "vm": "vm-browserify",
    "tls": false
  },
  "browser": {
    "zlib": "browserify-zlib",
    "console": "console-browserify",
    "constants": "constants-browserify",
    "crypto": "react-native-crypto",
    "dns": "dns.js",
    "net": "react-native-tcp",
    "domain": "domain-browser",
    "http": "@tradle/react-native-http",
    "https": "https-browserify",
    "os": "react-native-os",
    "path": "path-browserify",
    "querystring": "querystring-es3",
    "fs": "react-native-level-fs",
    "_stream_transform": "readable-stream/transform",
    "_stream_readable": "readable-stream/readable",
    "_stream_writable": "readable-stream/writable",
    "_stream_duplex": "readable-stream/duplex",
    "_stream_passthrough": "readable-stream/passthrough",
    "dgram": "react-native-udp",
    "stream": "stream-browserify",
    "timers": "timers-browserify",
    "tty": "tty-browserify",
    "vm": "vm-browserify",
    "tls": false
  }
}

哦,另一个Expo init项目正常工作。

0 个答案:

没有答案