dpa99c / react-native-launch-navigator

A React Native module for launching today's most popular navigation/ride apps to navigate to a destination.
143 stars 34 forks source link

Error when trying to install with npm #36

Closed Javierko closed 3 years ago

Javierko commented 4 years ago

Hey, after using npm install --save react-native-launch-navigator i've got this error below. Is there any way to fix?

PS E:\PHP\laragon\www\mobile> npm install --save react-native-launch-navigator

react-native-launch-navigator@1.0.7 postinstall E:\PHP\laragon\www\mobile\node_modules\react-native-launch-navigator node scripts/postinstall.js

internal/validators.js:120 throw new ERR_INVALID_ARG_TYPE(name, 'string', value); ^

TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received null at validateString (internal/validators.js:120:11) at Object.join (path.js:375:7) at Object. (E:\PHP\laragon\www\mobile\node_modules\react-native-launch-navigator\scripts\ios.link_helpers.js:45:23) at Module._compile (internal/modules/cjs/loader.js:1137:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10) at Module.load (internal/modules/cjs/loader.js:985:32) at Function.Module._load (internal/modules/cjs/loader.js:878:14) at Module.require (internal/modules/cjs/loader.js:1025:19) at require (internal/modules/cjs/helpers.js:72:18) code: 'ERR_INVALID_ARG_TYPE' } npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! react-native-launch-navigator@1.0.7 postinstall: node scripts/postinstall.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the react-native-launch-navigator@1.0.7 postinstall script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Adam\AppData\Roaming\npm-cache_logs\2020-09-08T19_38_01_325Z-debug.log

baatten commented 3 years ago

I get the same error. anyone found a solution?

Javierko commented 3 years ago

I get the same error. anyone found a solution?

I still didn't find any fix. I used this one https://www.npmjs.com/package/react-native-open-maps which works fine for me.

dpa99c commented 3 years ago

This module currently assumes that the development platform is OSX (and therefore commands such as pod install are available) and also that the ios platform project is present in the React Native project into which the module is installed. Hence why you're getting an error on Windows. I'll need to update the scripts to run the iOS hooks conditionally which should resolve the error.