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

Turn dependency peer requirements from error to warning during build #32

Closed
bdiz opened this issue Jul 8, 2018 · 2 comments
Closed

Comments

@bdiz
Copy link

bdiz commented Jul 8, 2018

Describe the bug
When a dependency of your project has a peer dependency in their package.json and npm thinks it is not installed vcp-electron-builder errors out on build.

npm install just prints a warning but still builds fine.

To Reproduce

vue create my-app
cd my-app
npm install --save-dev [email protected]
vue invoke vue-cli-plugin-electron-builder
npm install --save [email protected] @firebase/app
npm run build
# npm WARN [email protected] requires a peer of firebase@>= 4.0.0 but none is installed. You must install peer dependencies yourself.
# build succeeds
npm run build:electron
# Unhandled rejection Error: Unresolved node modules: firebase
# build fails

Expected behavior
I expect a warning peer dependencies like npm run build and the build to succeed.

Environment (please complete the following information):

  • OS and version: Ubuntu 16.10
  • Node version: v10.5.0
  • npm version: 6.1.0
  • yarn version (if used):
  • vue-cli-plugin-electron-builder version : 1.0.0-beta-5
  • vue/cli-service: 3.0.0-rc.3
  • other vue plugins used: none
  • custom config for vcp-electron-builder: none
  • (if possible) link to your repo: not possible

Additional context
I install firebase using @firebase/app to save on bundle size when built for web. This is why I get the warning with npm run build but my app will still function properly.

I actually don't use firebase for electron builds and instead use an on disk db which really makes this warning unimportant to me for electron builds.

@nklayman
Copy link
Owner

nklayman commented Jul 8, 2018

For some reason, my build works completely fine after following your reproduction instructions. I am on windows though, so that might be why. I am going camping for two weeks starting later today, so I will not be able to help after 1:30ish pacific time. You might have to figure this one out on your own.

@nklayman
Copy link
Owner

I believe this issue was fixed in electron-builder. I will close this issue, if it still fails feel free to re-open it.

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

2 participants