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

A peer dependency cannot be resolved #660

Open
farcaller opened this issue Nov 15, 2020 · 0 comments
Open

A peer dependency cannot be resolved #660

farcaller opened this issue Nov 15, 2020 · 0 comments

Comments

@farcaller
Copy link

farcaller commented Nov 15, 2020

  • Monopack version: 0.2.6

Is this a Feature or Bug?

Bug

Current behavior:

Based on the commit:

$ cd packages/metanotes-server
$ yarn run monopack build -d ./dist src/index.ts
yarn run v1.22.4
$ node_modules/.bin/monopack build -d ./dist src/index.ts
=>> monopack v0.2.6
=>> monopack build packages/metanotes-server/src/index.ts  --out-dir ./dist
=>> monopack is using monorepo root .
=>> monopack will build a main.js into packages/metanotes-server/dist
Hash: bf53fe8e560e2ace1f50
Version: webpack 4.18.0
Time: 3457ms
Built at: 15/11/2020 09:53:09
      Asset      Size  Chunks             Chunk Names
    main.js  85.2 KiB    main  [emitted]  main
main.js.map   128 KiB    main  [emitted]  main
Entrypoint main = main.js main.js.map
[./packages/metanotes-server-api/lib/api_grpc_pb.js] 6.62 KiB {main} [built]
[./packages/metanotes-server-api/lib/api_pb.js] 54.8 KiB {main} [built]
[./packages/metanotes-server-api/lib/index.js] 1.65 KiB {main} [built]
[./packages/metanotes-server/src/index.ts] 1.88 KiB {main} [built]
[./packages/metanotes-server/src/server.ts] 5.4 KiB {main} [built]
[./packages/metanotes-server/src/store.ts] 5.8 KiB {main} [built]
[@grpc/grpc-js] external "@grpc/grpc-js" 42 bytes {main} [built]
[google-protobuf] external "google-protobuf" 42 bytes {main} [built]
[google-protobuf/google/protobuf/empty_pb] external "google-protobuf/google/protobuf/empty_pb" 42 bytes {main} [built]
[google-protobuf/google/protobuf/empty_pb.js] external "google-protobuf/google/protobuf/empty_pb.js" 42 bytes {main} [built]
[path] external "path" 42 bytes {main} [built]
[process] external "process" 42 bytes {main} [built]
[sql-template-strings] external "sql-template-strings" 42 bytes {main} [built]
[sqlite] external "sqlite" 42 bytes {main} [built]
[sqlite3] external "sqlite3" 42 bytes {main} [built]
=>> monopack will resolve dependencies
=>> Undeclared dependencies
    @grpc/grpc-js from /Users/farcaller/src/cardwiki/metajournal-monorepo/packages/metanotes-server-api/lib
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Desired behavior:

Monopack succeeds.

Monopack is supposed to build metanotes-server, that depends on

"@grpc/grpc-js": "^1.2.0",
"@metanotes/server-api": "0.1.0",

And metanotes-server-api has a peer dependency on

"@grpc/grpc-js": "^1.2.0",

My expectation is that metanotes-server-api would see @grpc/grpc-js from its parent package.

How to reproduce:

run yarn build within packages/metanotes-server-api, then within packages/metanotes-server.

Repository URL exposing the problem

https://github.com/farcaller/metanotes/tree/1a78157d7d0119a52cdf4ae53ad0dac8b3bbda4d

Additional Info (logs, stack traces, etc)

farcaller added a commit to farcaller/metanotes-legacy that referenced this issue Nov 15, 2020
…esolution works

Arguably, flegall/monopack#660 could be a better solution if it's fixed
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

1 participant