Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when trying to install with npm #36

Closed
Javierko opened this issue Sep 8, 2020 · 3 comments
Closed

Error when trying to install with npm #36

Javierko opened this issue Sep 8, 2020 · 3 comments

Comments

@Javierko
Copy link

Javierko commented Sep 8, 2020

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

[email protected] 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: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: node scripts/postinstall.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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
Copy link

baatten commented Sep 24, 2020

I get the same error. anyone found a solution?

@Javierko
Copy link
Author

Javierko commented Oct 5, 2020

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
Copy link
Owner

dpa99c commented Oct 6, 2020

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.

@dpa99c dpa99c closed this as completed in 33ba1a0 Oct 6, 2020
dpa99c added a commit that referenced this issue Oct 6, 2020
… to only run iOS-specific hooks if iOS platform project exists and development platform is OSX.

Resolves #36.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants