Stacks.js: @stacks/auth not usable in app

Created on 9 Nov 2020  路  7Comments  路  Source: blockstack/stacks.js

Describe the bug
Importing @stacks/auth 1.0.0-beta.9 results in the error using a simple react app

Failed to compile.

./node_modules/@stacks/connect/dist/connect.esm.js
Module not found: Can't resolve 'blockstack' in '/home/friedger/_repos/github/friedger/speed-spend/node_modules/@stacks/connect/dist'

What version of stacks.js are you using?
1.0.0-beta.9
Is the bug present in the Blockstack CLI, Gaia hub, Connect or Blockstack Browser?
auth

To Reproduce
Steps to reproduce the behavior:

  1. git checkout speed spend
  2. update dependencies to stacks/auth
  3. yarn start
  4. See error

Expected behavior
Just resolve the dependencies

Additional context
@stacks/auth (exports useConnect) uses @stacks/connect (exports useConenct, imports UserSession) uses @stacks/auth (exports UserSession)

Most helpful comment

@markmhx I think this (stale) pr needs to be merged first to get rid of this issue https://github.com/blockstack/ux/pull/686

All 7 comments

Adding blockstack as a dependency helps as a workaround.

I think this was resolved with https://github.com/blockstack/stacks.js/pull/875

Same error with v1.0.0-beta.20 I think it was not resolved.

@pradel @friedger Is this still a problem if you import stacks/connect instead of stacks/auth, and does the former work for your purposes?

@markmhx I think this (stale) pr needs to be merged first to get rid of this issue https://github.com/blockstack/ux/pull/686

Sounds good. This is now blocked by the new PR https://github.com/blockstack/ux/pull/743

I'm assigning this issue to @hstove so he follows up here after that PR is merged.

Was this page helpful?
0 / 5 - 0 ratings