EMFILE too many open files

电脑又抽风了,什么删了node_modules重新装,什么重启,什么加缓存都不好使 …

node:events:485
throw er; // Unhandled 'error' event
^

Error: EMFILE: too many open files, watch
at FSWatcher._handle.onchange (node:internal/fs/watchers:207:21)
Emitted 'error' event on NodeWatcher instance at:
at FSWatcher._checkedEmitError (/Users/net.cctv3.i/iCloud-mobile/node_modules/metro-file-map/src/watchers/NodeWatcher.js:134:12)
at FSWatcher.emit (node:events:507:28)
at FSWatcher._handle.onchange (node:internal/fs/watchers:213:12) {
errno: -24,
syscall: 'watch',
code: 'EMFILE',
filename: null
}

Node.js v23.7.0
阅读更多

npm install 指定版本的几个疑问

npm install 到底 install 的什么版本,@和^到底能不能锁住版本?

运行 npm install --force 时,安装的 react-native-reanimated 版本取决于 package.jsonpackage-lock.json 的情况:

  1. 如果 package.json 里是 "react-native-reanimated": "^3.4.2"
  • ^3.4.2 代表可以安装 3.x.x 但不会升级到 4.0.0 及以上。

  • 如果 package-lock.json 存在,并且锁定的是 3.4.2,则会安装 3.4.2

  • 如果 package-lock.json 不存在或被删除,则可能会安装 3.x.x 中的最新版本(比如 3.5.0,如果已经发布)。

阅读更多

记录一次NDK版本不匹配,Android打包失败的蛋疼经历

背景:低版本构建的 RN 项目,在一台比较新的机器上,运行的时候NDK版本不对,死活下载不下来,构建一直报错。

首先,在git里面,local.properties是被忽略的,仓库里面是没有的。
要自己新建一个文件,android/local.properties

sdk.dir=/Users/net.cctv3.i/Library/Android/sdk
ndk.dir=/Users/net.cctv3.i/Library/Android/sdk/ndk/26.1.10909125
阅读更多

Duplicate resources --> string/app_name

Execution failed for task ‘:app:mergeReleaseResources’.

[string/app_name] /Users/net.cctv3.i/bookkeeping-mobile/android/app/src/main/res/values/strings.xml [string/app_name] /Users/net.cctv3.i/bookkeeping-mobile/android/app/build/generated/res/resValues/release/values/gradleResValues.xml: Error: Duplicate resources

阅读更多

react-native init 指定版本

旧版本:
建议放弃,各种库都打包报错
npx react-native@0.72.17 init iCloud --version 0.72.17

新版本:
建议放弃,学个毛线🧶RN,回家卖红薯🍠去吧
npx @react-native-community/cli init iCloud --version 0.76.7

react-native 上传文件到 Supabase

Supabase 是一个全栈解决方案,它包括了数据库、身份验证、实时更新、存储等服务,适合那些希望减少开发时间和复杂性的应用。

最近在找一个能免费存储的服务商,自己搭的应用,不想写后端,也不想乱七八糟的各种环境的部署。选来选去选择了Supabase

https://github.com/supabase/supabase

74.9K⭐️,懂得都懂 …

Snipaste 2024 12 12 10 13 50

阅读更多

npm publish 发包失败

npm发包失败,直接报错:

npm notice Publishing to https://registry.npmjs.org/ with tag latest and public access
npm ERR! code E403
npm ERR! 403 403 Forbidden - PUT https://registry.npmjs.org/react-native-use-toast - You do not have permission to publish "react-native-use-toast". Are you logged in as the correct user?
npm ERR! 403 In most cases, you or one of your dependencies are requesting
npm ERR! 403 a package version that is forbidden by your security policy, or
npm ERR! 403 on a server you do not have access to.
阅读更多