wutiange / log-listener-plugin

log-record 客户端对应的的插件(Log-record client corresponding plugin)
Apache License 2.0
1 stars 1 forks source link

引入插件后,npx react-native run-ios时报错 #1

Closed Mynini closed 2 weeks ago

Mynini commented 2 weeks ago

问题1: error While trying to resolve module @wutiange/log-listener-plugin from file /Users/ly/project/react_native_template/index.js, the package /Users/ly/project/react_native_template/node_modules/@wutiange/log-listener-plugin/package.json was successfully found. However, this package itself specifies a main module field that could not be resolved (/Users/ly/project/react_native_template/node_modules/@wutiange/log-listener-plugin/index.ts. Indeed, none of these files exist:

image

package.json 配置有些问题,ai 提示,1 。 邮箱要有@开发,2 .package.json 里面 react-native和 main 冲突 我改成这样后没报错了,这插件包配置的有些问题。 { "name": "@wutiange/log-listener-plugin", "version": "2.0.0", "description": "log-record 客户端对应的的插件\r\nLog-record client corresponding plugin", "main": "dist/index.js", "types": "dist/index.d.ts", "source": "index.ts", "repository": { "type": "git", "url": "https://github.com/wutiange/log-listener-plugin.git" }, "author": "wutiange wutiange20@qq.com", "license": "MIT", "keywords": [ "react-native", "log", "debugger", "charles" ], "private": false, "scripts": { "build": "npm run test && tsc", "dev": "ts-node ./index.ts", "publish-alpha": "npm publish --access public --tag alpha", "prepublishOnly": "npm run build", "test": "jest" }, "devDependencies": { "@jest/globals": "^29.7.0", "@types/crypto-js": "^4.2.2", "@types/jest": "^29.5.12", "@types/react-native-zeroconf": "^0.13.1", "@types/url-parse": "^1.4.11", "jest": "^29.7.0", "ts-jest": "^29.1.2", "ts-node": "^10.9.2", "typescript": "^5.3.3" }, "peerDependencies": { "react-native": "*", "react-native-device-info": "^14.0.0", "react-native-zeroconf": "^0.13.8" }, "files": [ "package.json", "README.md", "LICENSE", "dist" ], "dependencies": { "crypto-js": "^4.2.0", "url-parse": "^1.5.10" } }

wutiange commented 2 weeks ago

由于我打包2.0.0的时候测试不充分导致的问题,我已经修复,并且下架了有问题的2.0.0版本