{“error”: “TypeError: Network request failed”, “status”: “FETCH_ERROR”}错误

问题描述

Android测试机上传图片时报错(iOS正常):
{"error": "TypeError: Network request failed", "status": "FETCH_ERROR"}

问题分析

上传图片使用库是"react-native-image-crop-picker": "^0.39.0"

问题解决

react-native-image-crop-picker返回的image.sourceURL和filename只在iOS下可用,所以代码改成这样:

      const filePath = Platform.OS === 'ios' ? image.sourceURL : image.path;
      const fileName =
        Platform.OS === 'ios' ? image.filename : image.path.split('/').pop();

      let formData = new FormData();
      const file = {
        uri: filePath,
        type: 'multipart/form-data',
        name: fileName,
      };
      formData.append('file', file);

NO_FLIPPER导致RN编译失败

问题描述

Xcode构建RN报错:

Undefined symbols for architecture arm64:
  "_OBJC_CLASS_$_FlipperClient", referenced from:
      objc-class-ref in libreact-native-flipper.a(FlipperReactNativeJavaScriptPluginManager.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

问题分析

NO_FLIPPER没有设置成功导致react-native-flipper编译时没有被排除
React Native 0.71.1 当 NO_FLIPPER=1 时排除 react-native-flipper 以防止 iOS 构建失败

# If you are using a `react-native-flipper` your iOS build will fail when `NO_FLIPPER=1` is set.
 # because `react-native-flipper` depends on (FlipperKit,...) that will be excluded
 #
 # To fix this you can also exclude `react-native-flipper` using a `react-native.config.js`
 # ```js
 # module.exports = {
 #   dependencies: {
 #     ...(process.env.NO_FLIPPER ? { 'react-native-flipper': { platforms: { ios: null } } } : {}),
 # ```

问题解决

通过设置NO_FLIPPER=1把Flipper从pods中排除后再构建RN
Disable Flipper for iOS

NO_FLIPPER=1 pod install --project-directory=ios

node版本过低导致RN编译失败

问题描述

Xcode编译RN项目失败:

Node found at: /usr/local/bin/node
/Users/couldhll/Desktop/Jesus/node_modules/yargs/node_modules/yargs-parser/build/index.cjs:1015
        throw Error(`yargs parser supports a minimum Node.js version of ${minNodeVersion}. Read our version support policy: https://github.com/yargs/yargs-parser#supported-nodejs-versions`);
        ^

Error: yargs parser supports a minimum Node.js version of 12. Read our version support policy: https://github.com/yargs/yargs-parser#supported-nodejs-versions
    at Object.<anonymous> (/Users/couldhll/Desktop/Jesus/node_modules/yargs/node_modules/yargs-parser/build/index.cjs:1015:15)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/Users/couldhll/Desktop/Jesus/node_modules/yargs/build/index.cjs:1:60637)
    at Module._compile (module.js:652:30)
Command PhaseScriptExecution failed with a nonzero exit code

问题分析

查了一下node的版本是8.11.3,需要的版本是12以上

/usr/local/bin/node -v
v8.11.3

问题解决

node(nvm安装)link到/usr/local/bin/node

ln -s $(which node) /usr/local/bin/node

Multiple commands produce报错

问题描述

iOS Build 报错:


Showing Recent Messages

Prepare build
note: Building targets in dependency order
error: Multiple commands produce '/Users/couldhll/Library/Developer/Xcode/DerivedData/Jesus-bixlpkqqeqxklgenquwktceekdsp/Build/Products/Debug-iphoneos/Jesus.app/AntDesign.ttf'
    note: Target 'Jesus' (project 'Jesus') has copy command from '/Users/couldhll/Desktop/Jesus/node_modules/react-native-vector-icons/Fonts/AntDesign.ttf' to '/Users/couldhll/Library/Developer/Xcode/DerivedData/Jesus-bixlpkqqeqxklgenquwktceekdsp/Build/Products/Debug-iphoneos/Jesus.app/AntDesign.ttf'
    note: That command depends on command in Target 'Jesus' (project 'Jesus'): script phase “[CP] Copy Pods Resources”
error: Multiple commands produce '/Users/couldhll/Library/Developer/Xcode/DerivedData/Jesus-bixlpkqqeqxklgenquwktceekdsp/Build/Products/Debug-iphoneos/Jesus.app/Entypo.ttf'
    note: Target 'Jesus' (project 'Jesus') has copy command from '/Users/couldhll/Desktop/Jesus/node_modules/react-native-vector-icons/Fonts/Entypo.ttf' to '/Users/couldhll/Library/Developer/Xcode/DerivedData/Jesus-bixlpkqqeqxklgenquwktceekdsp/Build/Products/Debug-iphoneos/Jesus.app/Entypo.ttf'
    note: That command depends on command in Target 'Jesus' (project 'Jesus'): script phase “[CP] Copy Pods Resources”
error: Multiple commands produce '/Users/couldhll/Library/Developer/Xcode/DerivedData/Jesus-bixlpkqqeqxklgenquwktceekdsp/Build/Products/Debug-iphoneos/Jesus.app/EvilIcons.ttf'
    note: Target 'Jesus' (project 'Jesus') has copy command from '/Users/couldhll/Desktop/Jesus/node_modules/react-native-vector-icons/Fonts/EvilIcons.ttf' to '/Users/couldhll/Library/Developer/Xcode/DerivedData/Jesus-bixlpkqqeqxklgenquwktceekdsp/Build/Products/Debug-iphoneos/Jesus.app/EvilIcons.ttf'
    note: That command depends on command in Target 'Jesus' (project 'Jesus'): script phase “[CP] Copy Pods Resources”
error: Multiple commands produce '/Users/couldhll/Library/Developer/Xcode/DerivedData/Jesus-bixlpkqqeqxklgenquwktceekdsp/Build/Products/Debug-iphoneos/Jesus.app/Feather.ttf'
    note: Target 'Jesus' (project 'Jesus') has copy command from '/Users/couldhll/Desktop/Jesus/node_modules/react-native-vector-icons/Fonts/Feather.ttf' to '/Users/couldhll/Library/Developer/Xcode/DerivedData/Jesus-bixlpkqqeqxklgenquwktceekdsp/Build/Products/Debug-iphoneos/Jesus.app/Feather.ttf'
    note: That command depends on command in Target 'Jesus' (project 'Jesus'): script phase “[CP] Copy Pods Resources”
error: Multiple commands produce '/Users/couldhll/Library/Developer/Xcode/DerivedData/Jesus-bixlpkqqeqxklgenquwktceekdsp/Build/Products/Debug-iphoneos/Jesus.app/FontAwesome.ttf'
    note: Target 'Jesus' (project 'Jesus') has copy command from '/Users/couldhll/Desktop/Jesus/node_modules/react-native-vector-icons/Fonts/FontAwesome.ttf' to '/Users/couldhll/Library/Developer/Xcode/DerivedData/Jesus-bixlpkqqeqxklgenquwktceekdsp/Build/Products/Debug-iphoneos/Jesus.app/FontAwesome.ttf'
    note: That command depends on command in Target 'Jesus' (project 'Jesus'): script phase “[CP] Copy Pods Resources”
error: Multiple commands produce '/Users/couldhll/Library/Developer/Xcode/DerivedData/Jesus-bixlpkqqeqxklgenquwktceekdsp/Build/Products/Debug-iphoneos/Jesus.app/FontAwesome5_Brands.ttf'
    note: Target 'Jesus' (project 'Jesus') has copy command from '/Users/couldhll/Desktop/Jesus/node_modules/react-native-vector-icons/Fonts/FontAwesome5_Brands.ttf' to '/Users/couldhll/Library/Developer/Xcode/DerivedData/Jesus-bixlpkqqeqxklgenquwktceekdsp/Build/Products/Debug-iphoneos/Jesus.app/FontAwesome5_Brands.ttf'
    note: That command depends on command in Target 'Jesus' (project 'Jesus'): script phase “[CP] Copy Pods Resources”
error: Multiple commands produce '/Users/couldhll/Library/Developer/Xcode/DerivedData/Jesus-bixlpkqqeqxklgenquwktceekdsp/Build/Products/Debug-iphoneos/Jesus.app/FontAwesome5_Regular.ttf'
    note: Target 'Jesus' (project 'Jesus') has copy command from '/Users/couldhll/Desktop/Jesus/node_modules/react-native-vector-icons/Fonts/FontAwesome5_Regular.ttf' to '/Users/couldhll/Library/Developer/Xcode/DerivedData/Jesus-bixlpkqqeqxklgenquwktceekdsp/Build/Products/Debug-iphoneos/Jesus.app/FontAwesome5_Regular.ttf'
    note: That command depends on command in Target 'Jesus' (project 'Jesus'): script phase “[CP] Copy Pods Resources”
error: Multiple commands produce '/Users/couldhll/Library/Developer/Xcode/DerivedData/Jesus-bixlpkqqeqxklgenquwktceekdsp/Build/Products/Debug-iphoneos/Jesus.app/FontAwesome5_Solid.ttf'
    note: Target 'Jesus' (project 'Jesus') has copy command from '/Users/couldhll/Desktop/Jesus/node_modules/react-native-vector-icons/Fonts/FontAwesome5_Solid.ttf' to '/Users/couldhll/Library/Developer/Xcode/DerivedData/Jesus-bixlpkqqeqxklgenquwktceekdsp/Build/Products/Debug-iphoneos/Jesus.app/FontAwesome5_Solid.ttf'
    note: That command depends on command in Target 'Jesus' (project 'Jesus'): script phase “[CP] Copy Pods Resources”
error: Multiple commands produce '/Users/couldhll/Library/Developer/Xcode/DerivedData/Jesus-bixlpkqqeqxklgenquwktceekdsp/Build/Products/Debug-iphoneos/Jesus.app/Fontisto.ttf'
    note: Target 'Jesus' (project 'Jesus') has copy command from '/Users/couldhll/Desktop/Jesus/node_modules/react-native-vector-icons/Fonts/Fontisto.ttf' to '/Users/couldhll/Library/Developer/Xcode/DerivedData/Jesus-bixlpkqqeqxklgenquwktceekdsp/Build/Products/Debug-iphoneos/Jesus.app/Fontisto.ttf'
    note: That command depends on command in Target 'Jesus' (project 'Jesus'): script phase “[CP] Copy Pods Resources”
error: Multiple commands produce '/Users/couldhll/Library/Developer/Xcode/DerivedData/Jesus-bixlpkqqeqxklgenquwktceekdsp/Build/Products/Debug-iphoneos/Jesus.app/Foundation.ttf'
    note: Target 'Jesus' (project 'Jesus') has copy command from '/Users/couldhll/Desktop/Jesus/node_modules/react-native-vector-icons/Fonts/Foundation.ttf' to '/Users/couldhll/Library/Developer/Xcode/DerivedData/Jesus-bixlpkqqeqxklgenquwktceekdsp/Build/Products/Debug-iphoneos/Jesus.app/Foundation.ttf'
    note: That command depends on command in Target 'Jesus' (project 'Jesus'): script phase “[CP] Copy Pods Resources”
error: Multiple commands produce '/Users/couldhll/Library/Developer/Xcode/DerivedData/Jesus-bixlpkqqeqxklgenquwktceekdsp/Build/Products/Debug-iphoneos/Jesus.app/Ionicons.ttf'
    note: Target 'Jesus' (project 'Jesus') has copy command from '/Users/couldhll/Desktop/Jesus/node_modules/react-native-vector-icons/Fonts/Ionicons.ttf' to '/Users/couldhll/Library/Developer/Xcode/DerivedData/Jesus-bixlpkqqeqxklgenquwktceekdsp/Build/Products/Debug-iphoneos/Jesus.app/Ionicons.ttf'
    note: That command depends on command in Target 'Jesus' (project 'Jesus'): script phase “[CP] Copy Pods Resources”
error: Multiple commands produce '/Users/couldhll/Library/Developer/Xcode/DerivedData/Jesus-bixlpkqqeqxklgenquwktceekdsp/Build/Products/Debug-iphoneos/Jesus.app/MaterialCommunityIcons.ttf'
    note: Target 'Jesus' (project 'Jesus') has copy command from '/Users/couldhll/Desktop/Jesus/node_modules/react-native-vector-icons/Fonts/MaterialCommunityIcons.ttf' to '/Users/couldhll/Library/Developer/Xcode/DerivedData/Jesus-bixlpkqqeqxklgenquwktceekdsp/Build/Products/Debug-iphoneos/Jesus.app/MaterialCommunityIcons.ttf'
    note: That command depends on command in Target 'Jesus' (project 'Jesus'): script phase “[CP] Copy Pods Resources”
error: Multiple commands produce '/Users/couldhll/Library/Developer/Xcode/DerivedData/Jesus-bixlpkqqeqxklgenquwktceekdsp/Build/Products/Debug-iphoneos/Jesus.app/MaterialIcons.ttf'
    note: Target 'Jesus' (project 'Jesus') has copy command from '/Users/couldhll/Desktop/Jesus/node_modules/react-native-vector-icons/Fonts/MaterialIcons.ttf' to '/Users/couldhll/Library/Developer/Xcode/DerivedData/Jesus-bixlpkqqeqxklgenquwktceekdsp/Build/Products/Debug-iphoneos/Jesus.app/MaterialIcons.ttf'
    note: That command depends on command in Target 'Jesus' (project 'Jesus'): script phase “[CP] Copy Pods Resources”
error: Multiple commands produce '/Users/couldhll/Library/Developer/Xcode/DerivedData/Jesus-bixlpkqqeqxklgenquwktceekdsp/Build/Products/Debug-iphoneos/Jesus.app/Octicons.ttf'
    note: Target 'Jesus' (project 'Jesus') has copy command from '/Users/couldhll/Desktop/Jesus/node_modules/react-native-vector-icons/Fonts/Octicons.ttf' to '/Users/couldhll/Library/Developer/Xcode/DerivedData/Jesus-bixlpkqqeqxklgenquwktceekdsp/Build/Products/Debug-iphoneos/Jesus.app/Octicons.ttf'
    note: That command depends on command in Target 'Jesus' (project 'Jesus'): script phase “[CP] Copy Pods Resources”
error: Multiple commands produce '/Users/couldhll/Library/Developer/Xcode/DerivedData/Jesus-bixlpkqqeqxklgenquwktceekdsp/Build/Products/Debug-iphoneos/Jesus.app/SimpleLineIcons.ttf'
    note: Target 'Jesus' (project 'Jesus') has copy command from '/Users/couldhll/Desktop/Jesus/node_modules/react-native-vector-icons/Fonts/SimpleLineIcons.ttf' to '/Users/couldhll/Library/Developer/Xcode/DerivedData/Jesus-bixlpkqqeqxklgenquwktceekdsp/Build/Products/Debug-iphoneos/Jesus.app/SimpleLineIcons.ttf'
    note: That command depends on command in Target 'Jesus' (project 'Jesus'): script phase “[CP] Copy Pods Resources”
error: Multiple commands produce '/Users/couldhll/Library/Developer/Xcode/DerivedData/Jesus-bixlpkqqeqxklgenquwktceekdsp/Build/Products/Debug-iphoneos/Jesus.app/Zocial.ttf'
    note: Target 'Jesus' (project 'Jesus') has copy command from '/Users/couldhll/Desktop/Jesus/node_modules/react-native-vector-icons/Fonts/Zocial.ttf' to '/Users/couldhll/Library/Developer/Xcode/DerivedData/Jesus-bixlpkqqeqxklgenquwktceekdsp/Build/Products/Debug-iphoneos/Jesus.app/Zocial.ttf'
    note: That command depends on command in Target 'Jesus' (project 'Jesus'): script phase “[CP] Copy Pods Resources”

Building targets in dependency order

Multiple commands produce '/Users/couldhll/Library/Developer/Xcode/DerivedData/Jesus-bixlpkqqeqxklgenquwktceekdsp/Build/Products/Debug-iphoneos/Jesus.app/AntDesign.ttf'

Multiple commands produce '/Users/couldhll/Library/Developer/Xcode/DerivedData/Jesus-bixlpkqqeqxklgenquwktceekdsp/Build/Products/Debug-iphoneos/Jesus.app/Entypo.ttf'

Multiple commands produce '/Users/couldhll/Library/Developer/Xcode/DerivedData/Jesus-bixlpkqqeqxklgenquwktceekdsp/Build/Products/Debug-iphoneos/Jesus.app/EvilIcons.ttf'

Multiple commands produce '/Users/couldhll/Library/Developer/Xcode/DerivedData/Jesus-bixlpkqqeqxklgenquwktceekdsp/Build/Products/Debug-iphoneos/Jesus.app/Feather.ttf'

Multiple commands produce '/Users/couldhll/Library/Developer/Xcode/DerivedData/Jesus-bixlpkqqeqxklgenquwktceekdsp/Build/Products/Debug-iphoneos/Jesus.app/FontAwesome.ttf'

Multiple commands produce '/Users/couldhll/Library/Developer/Xcode/DerivedData/Jesus-bixlpkqqeqxklgenquwktceekdsp/Build/Products/Debug-iphoneos/Jesus.app/FontAwesome5_Brands.ttf'

Multiple commands produce '/Users/couldhll/Library/Developer/Xcode/DerivedData/Jesus-bixlpkqqeqxklgenquwktceekdsp/Build/Products/Debug-iphoneos/Jesus.app/FontAwesome5_Regular.ttf'

Multiple commands produce '/Users/couldhll/Library/Developer/Xcode/DerivedData/Jesus-bixlpkqqeqxklgenquwktceekdsp/Build/Products/Debug-iphoneos/Jesus.app/FontAwesome5_Solid.ttf'

Multiple commands produce '/Users/couldhll/Library/Developer/Xcode/DerivedData/Jesus-bixlpkqqeqxklgenquwktceekdsp/Build/Products/Debug-iphoneos/Jesus.app/Fontisto.ttf'

Multiple commands produce '/Users/couldhll/Library/Developer/Xcode/DerivedData/Jesus-bixlpkqqeqxklgenquwktceekdsp/Build/Products/Debug-iphoneos/Jesus.app/Foundation.ttf'

Multiple commands produce '/Users/couldhll/Library/Developer/Xcode/DerivedData/Jesus-bixlpkqqeqxklgenquwktceekdsp/Build/Products/Debug-iphoneos/Jesus.app/Ionicons.ttf'

Multiple commands produce '/Users/couldhll/Library/Developer/Xcode/DerivedData/Jesus-bixlpkqqeqxklgenquwktceekdsp/Build/Products/Debug-iphoneos/Jesus.app/MaterialCommunityIcons.ttf'

Multiple commands produce '/Users/couldhll/Library/Developer/Xcode/DerivedData/Jesus-bixlpkqqeqxklgenquwktceekdsp/Build/Products/Debug-iphoneos/Jesus.app/MaterialIcons.ttf'

Multiple commands produce '/Users/couldhll/Library/Developer/Xcode/DerivedData/Jesus-bixlpkqqeqxklgenquwktceekdsp/Build/Products/Debug-iphoneos/Jesus.app/Octicons.ttf'

Multiple commands produce '/Users/couldhll/Library/Developer/Xcode/DerivedData/Jesus-bixlpkqqeqxklgenquwktceekdsp/Build/Products/Debug-iphoneos/Jesus.app/SimpleLineIcons.ttf'

Multiple commands produce '/Users/couldhll/Library/Developer/Xcode/DerivedData/Jesus-bixlpkqqeqxklgenquwktceekdsp/Build/Products/Debug-iphoneos/Jesus.app/Zocial.ttf'

Computing target dependency graph and provisioning inputs

Create build description
Build description signature: e34cffb17530f18e248a8120033bffe3
Build description path: /Users/couldhll/Library/Developer/Xcode/DerivedData/Jesus-bixlpkqqeqxklgenquwktceekdsp/Build/Intermediates.noindex/XCBuildData/e34cffb17530f18e248a8120033bffe3-desc.xcbuild

问题分析

原因是react-native-vector-icons所使用的ttf字体文件被导入了两次:
一次是手动导入:通过项目导入
一次是自动导入:Pods-Jesus-resources.sh

问题解决

方法一:移除手动导入

移除项目中手动导入的字体文件

方法二:取消自动导入

react-native.config.js文件中加入如下代码:

module.exports = {
  dependencies: {
    'react-native-vector-icons': {
      platforms: {
        ios: null,
      },
    },
  },
};

React Native的Metro启动不了

问题描述

今天yarn start出现如下错误

metro-file-map: Watchman crawl failed. Retrying once with node crawler.
  Usually this happens when watchman isn't running. Create an empty `.watchmanconfig` file in your project's root folder or initialize a git or hg repository in your project.
  Error: Watchman error: std::__1::system_error: open: /Users/couldhll/Desktop/Jesus: Operation not permitted. Make sure watchman is running for this project. See https://facebook.github.io/watchman/docs/troubleshooting.
node:events:491
      throw er; // Unhandled 'error' event
      ^

Error: std::__1::system_error: open: /Users/couldhll/Desktop/Jesus: Operation not permitted
    at BunserBuf.<anonymous> (/Users/couldhll/Desktop/Jesus/node_modules/fb-watchman/index.js:99:23)
    at BunserBuf.emit (node:events:513:28)
    at BunserBuf.process (/Users/couldhll/Desktop/Jesus/node_modules/bser/index.js:292:10)
    at /Users/couldhll/Desktop/Jesus/node_modules/bser/index.js:247:12
    at process.processTicksAndRejections (node:internal/process/task_queues:77:11)
Emitted 'error' event on WatchmanWatcher instance at:
    at Client.<anonymous> (/Users/couldhll/Desktop/Jesus/node_modules/metro-file-map/src/watchers/WatchmanWatcher.js:107:12)
    at Client.emit (node:events:513:28)
    at BunserBuf.<anonymous> (/Users/couldhll/Desktop/Jesus/node_modules/fb-watchman/index.js:111:12)
    at BunserBuf.emit (node:events:513:28)
    at /Users/couldhll/Desktop/Jesus/node_modules/bser/index.js:249:12
    at process.processTicksAndRejections (node:internal/process/task_queues:77:11) {
  watchmanResponse: {
    error: 'std::__1::system_error: open: /Users/couldhll/Desktop/Jesus: Operation not permitted',
    version: '2022.11.14.00'
  }
}

Node.js v18.12.1
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

问题解决

在终端使用如下命令:

步骤一

watchman watch-del-all

步骤二

watchman shutdown-server

当pip命令遇到No module named ‘pip._internal.cli’报错

问题描述

想给pip升级,出现如下错误:

➜  ~ pip3.6 -V
Traceback (most recent call last):
  File "/usr/local/bin/pip3.6", line 7, in <module>
    from pip._internal.cli.main import main
ModuleNotFoundError: No module named 'pip._internal.cli'

问题解决

  1. 用Vim修改pip3.6文件
    sudo vi /usr/local/bin/pip3.6
  2. from pip._internal.cli.main import main注释掉改成如下:
    #from pip._internal.cli.main import main
    from pip._internal import main

WordPress升级HTTPS后样式丢失

问题描述

WordPress升级HTTPS(SSL)样式丢失,并且管理后台304循环跳转。

问题解决

修改/wp-includes/functions.php文件

加入代码

add_filter('script_loader_src', 'agnostic_script_loader_src', 20,2);
function agnostic_script_loader_src($src, $handle){
    return preg_replace('/^(http|https):/', '', $src);
}
add_filter('style_loader_src', 'agnostic_style_loader_src', 20,2);
function agnostic_style_loader_src($src, $handle){
    return preg_replace('/^(http|https):/', '', $src);
}

修改/wp-config.php文件

加入代码

$_SERVER['HTTPS'] = 'on';
define('FORCE_SSL_LOGIN', true);
define('FORCE_SSL_ADMIN', true);

在WordPress后台修改网站地址

网站后台管理-设置-常规选项-WordPress地址(URL)和站点地址(URL)

http://blog.couldhll.com
修改为
https://blog.couldhll.com

Linux添加虚拟内存

问题描述

过了几个小时本博客就会失去响应。

问题分析

查看阿里云的监控后台,发现服务器的内存使用量持续高达90。

问题解决

为服务器增加虚拟内存

建立交换文件夹

mkdir /swap/swapfile

创建交换文件(大小1G)

dd if=/dev/zero of=/swap/swapfile bs=1M count=1024

格式化交换文件

mkswap /swap/swapfile

挂载交换文件

swapon /swap/swapfile

查看虚拟内存是否设置成功

运行free然后看Swap行的total数值,不为0即为挂载成功

添加开机启动

为文件/etc/fstab添加行/swap/swapfile swap swap defaults 0 0

关于小程序的一些指南链接

小程序微信认证:https://kf.qq.com/product/wx_xcx.html#hid=3025
小程序接入指南:https://developers.weixin.qq.com/miniprogram/introduction/#%E5%B0%8F%E7%A8%8B%E5%BA%8F%E7%94%B3%E8%AF%B7%E5%BE%AE%E4%BF%A1%E8%AE%A4%E8%AF%81

小程序开发指南:https://developers.weixin.qq.com/miniprogram/dev/framework/
云开发指南:https://developers.weixin.qq.com/miniprogram/dev/wxcloud/basis/getting-started.html