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: While trying to resolve module react-native-spotify-remote #100

Closed
djwillcaine opened this issue Feb 20, 2021 · 5 comments
Closed

Comments

@djwillcaine
Copy link
Contributor

djwillcaine commented Feb 20, 2021

Since a change to package.json introduced in 5cdf417 the module crashes when not being run from source with the following error message:

error: Error: While trying to resolve module `react-native-spotify-remote` from file `C:\dev\Juuke\src\constants.js`, the package `C:\dev\Juuke\node_modules\react-native-spotify-remote\package.json` was successfully found. However, this package itself specifies a `main` module field that could not be resolved (`C:\dev\Juuke\node_modules\react-native-spotify-remote\src\index`. Indeed, none of these files exist:

Removing lines 33 and 34 from package.json again fixed the issue for me. I'm not actually 100% certain what either of these lines do, to be honest, so I didn't want to just submit a PR removing them. Obviously they make reference to the src directory though, which isn't present when installing the package through npm/yarn, hence the error.

@djwillcaine
Copy link
Contributor Author

djwillcaine commented Feb 20, 2021

Do they just want changing to dist/index instead of src/index? That also runs just fine.

@reteps
Copy link
Contributor

reteps commented Feb 27, 2021

Also have this issue.

@cjam
Copy link
Owner

cjam commented Feb 28, 2021

Ah shoot, I introduced that issue. I'll try and get a fix out soon.

@cjam
Copy link
Owner

cjam commented Feb 28, 2021

I merged this in an published 0.3.5 which should fix this. Let me know and feel free to close this issue if it's fixed. Thanks @djwillcaine for the PR.

@cjam
Copy link
Owner

cjam commented Mar 10, 2021

Haven't heard anything back so I'm assuming its fixed.

@cjam cjam closed this as completed Mar 10, 2021
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