Closed QBlockQ closed 10 months ago
Can you give more details? How to reproduce this, and with what versions of nodejs-mobile-react-native, yarn, react native, Node.js etc.
The error in your pack.log indicates a problem with the create-node-structure.js script in the nodejs-mobile-react-native package. The specific error is a TypeError [ERR_INVALID_ARG_TYPE] stating that "The 'path' argument must be of type string. Received undefined." This suggests that the script is expecting a string argument for a file path, but it's receiving undefined instead.
We're using Node.js v18.18.0
{ "name": "nodejs-mobile-react-native", "version": "18.17.4", "description": "Node.js for Mobile Apps React Native plugin", "main": "index.js", "scripts": { "postinstall": "node scripts/create-node-structure.js" }, "keywords": [ "react-native", "mobile", "nodejs", "node.js", "nodejs-mobile" ], "author": "janeasystems", "license": "MIT", "homepage": "https://code.janeasystems.com/nodejs-mobile", "repository": { "type": "git", "url": "https://github.com/nodejs-mobile/nodejs-mobile-react-native" }, "bugs": { "url": "https://github.com/nodejs-mobile/nodejs-mobile/issues" }, "peerDependencies": { "react-native": ">=0.60.0" }, "dependencies": { "mkdirp": "^0.5.1", "ncp": "^2.0.0", "nodejs-mobile-gyp": "^0.3.1", "node-gyp-build-mobile": "4.6.0-2", "xcode": "^2.0.0" } }
Yarn version 3.6.0
In the package.json, the "peerDependencies" section indicates that the nodejs-mobile-react-native plugin requires a React Native version of 0.60.0 or higher to work properly but does not tell the exact version of React Native used in this project.
If we run react-native --version, we got the below
react-native-cli: 2.0.1 react-native: n/a - not inside a React Native project directory
You pasted the package.json of nodejs-mobile-react-native, not the version of nodejs-mobile-react-native as a dependency in your project's package.json.
Sorry, this is a waste of time to ask for more information and not get it.
The file create-node-structure.js got an issue after running yarn install, please fix it.