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

Package path . is not exported from package #5456

Closed
rendomnet opened this issue Sep 8, 2021 · 10 comments
Closed

Package path . is not exported from package #5456

rendomnet opened this issue Sep 8, 2021 · 10 comments

Comments

@rendomnet
Copy link

rendomnet commented Sep 8, 2021

[REQUIRED] Describe your environment

  • Operating System version: Windows 10
  • Browser version: Electron 13
  • Firebase SDK version: "9.0.1"
  • Firebase Product: firebase js

[REQUIRED] Describe the problem

I'm trying to add firebase to react-electron-boilerplate and after adding "firebase": "9.0.1" to my package.json and running yarn.
I have this error.

ERROR in dll renderer renderer[14]
Module not found: Error: Package path . is not exported from package PATH\boiler\node_modules\firebase (see exports field in PATH\boiler\node_modules\firebase\package.json)

webpack compiled with 1 error

If I delete "firebase": "9.0.1" from package.json then there is no error.

Steps to reproduce:

install react-electron-boilerplate and add firebase
https://github.com/electron-react-boilerplate/electron-react-boilerplate

firebase is the only package that gives me such error

@google-oss-bot
Copy link
Contributor

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

@Feiyang1
Copy link
Member

Feiyang1 commented Sep 8, 2021

How do you import firebase? Note that firebase is not a valid import in v9, you need to import from sub modules like firebase/app , firebase/auth, etc.

@rendomnet
Copy link
Author

@Feiyang1 it happens on the stage of installing firebase. 'yarn add firebase'. there is no imports added yet.

@jthegedus
Copy link

jthegedus commented Sep 9, 2021

Vite.js started reporting these types of warnings recently as well:

So it seems Yarn and Vite have started showing users errors with package resolution which seem to previously been hidden.

@Feiyang1
Copy link
Member

@rendomnet What is the version of yarn? I couldn't reproduce it with 1.22.11.

As I mentioned above, The "." export is deliberately not defined for the firebase package, because it's not a valid import path. Tooling should not throw an error just because "." export is not defined, which is a perfectly fine use case.

@rendomnet
Copy link
Author

rendomnet commented Sep 14, 2021

@Feiyang1 yarn version 1.22.10
updated to 1.22.11 and same error :/

@hsubox76
Copy link
Contributor

It looks like it's not actually a yarn install issue, it's something specific to the electron-react-boilerplate project (you said react-electron-boilerplate, but I'm guessing it's the same one or a very similar one). That project has a postinstall step that runs after yarn, which attempts to build the bundle with webpack. The "dll renderer" in the error messages (that's the name of the webpack config) indicates that this step is where the error is happening. If you can't figure out what that webpack config does, perhaps you can file an issue with electron-react-boilerplate and ask them if this is expected behavior.

https://github.com/electron-react-boilerplate/electron-react-boilerplate/blob/2528e688ebfc8b477ab59b75d9a0cb5d49fb8988/package.json#L12

@google-oss-bot
Copy link
Contributor

Hey @rendomnet. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!

@google-oss-bot
Copy link
Contributor

Since there haven't been any recent updates here, I am going to close this issue.

@rendomnet if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.

@Ayushsanjdev
Copy link

same I m also facing the issue, does anyone got the solution yet?

@firebase firebase locked and limited conversation to collaborators Oct 28, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants