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

Handle peerDependencies #55

Closed
bennypowers opened this issue Jun 13, 2019 · 2 comments
Closed

Handle peerDependencies #55

bennypowers opened this issue Jun 13, 2019 · 2 comments

Comments

@bennypowers
Copy link

Consider the case of @apollo-elements/lit-apollo:

{
  "name": "@apollo-elements/lit-apollo",
  "version": "1.1.0",
  "module": "index.js",
  "dependencies": {
    "@apollo-elements/mixins": "^1.1.0"
  },
  "peerDependencies": {
    "lit-element": "^2.0.1",
    "lit-html": "^1.0.0"
  }
}

@apollo-elements/lit-apollo relies on @apollo-elements/lib which in turn relies on graphql-tag which has a peerDependency to graphql

pikawebification produces:

npx @pika/web                                                         24.8s
npx: installed 75 in 3.075s
⠼ @pika/web installing... @apollo-elements/lit-apollo
✖ 'lit-html' is imported by 'node_modules/@apollo-elements/lit-apollo/index.js', but could not be resolved.
  Make sure that the file or package exists on disk.
✖ 'lit-element' is imported by 'node_modules/@apollo-elements/lit-apollo/index.js', but could not be resolved.
  Make sure that the file or package exists on disk.
✖ 'lit-element' is imported by 'node_modules/@apollo-elements/lit-apollo/apollo-element.js', but could not be resolved.
  Make sure that the file or package exists on disk.
✖ 'graphql/language/visitor' is imported by 'node_modules/apollo-client/bundle.esm.js', but could not be resolved.
  Make sure that the file or package exists on disk.
✖ 'graphql/language/visitor' is imported by 'node_modules/apollo-utilities/lib/bundle.esm.js', but could not be resolved.
  Make sure that the file or package exists on disk.
✖ 'graphql/language/parser' is imported by 'node_modules/graphql-tag/src/index.js', but could not be resolved.
  Make sure that the file or package exists on disk.
✖ 'graphql/language/parser' is imported by 'commonjs-external-graphql/language/parser', but could not be resolved.
  Make sure that the file or package exists on disk.
✖ 'graphql/language/printer' is imported by 'node_modules/apollo-link/lib/bundle.esm.js', but could not be resolved.
  Make sure that the file or package exists on disk.
✔ @pika/web installed: @apollo-elements/lit-apollo. [1.50s]
⚠ Finished with warnings.

Perhaps pika/web should install those peerDeps?

@FredKSchott
Copy link
Owner

For now, @pika/web leaves the actual package installing to npm, and just focuses on web-ifying your deps. Re-reading that error message though, and I feel like it could be more friendly. What about:

"Make sure that the package was installed correctly and that the file exists."

@FredKSchott
Copy link
Owner

Fixed to a more friendly error message.

drwpow pushed a commit that referenced this issue Jul 24, 2020
* make @snowpack/plugin-babel compatible with v2

* allow for sourcemaps
drwpow pushed a commit that referenced this issue Jul 27, 2020
* make @snowpack/plugin-babel compatible with v2

* allow for sourcemaps
drwpow pushed a commit that referenced this issue Jul 27, 2020
* make @snowpack/plugin-babel compatible with v2

* allow for sourcemaps
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