React Dependency Error
I'm using NextJS to build a listing site. I ran into this error: ⨯ ./node_modules/@arcblock/did-connect/lib/OAuth/space.js:3
Module not found: Can't resolve '@blocklet/js-sdk'
1 | import axios from 'axios';
2 | import { joinURL } from 'ufo';
> 3 | import { getCSRFToken } from '@blocklet/js-sdk';
| ^4 | import { DID_SPACES_DID } from '../env';
5 |
6 | /* eslint-disable import/prefer-default-export */
When using the arcblock DID Connect module. Any info on this would be appreciated. I am also using legacy dependencies because some of the arcblock dependencies were not compatible with the most recent version of React.
5 条回复
Hi, you just need to add
@blocklet/js-sdkto your blocklet, since it's a peer dependency.Hi we don't plan to launch a blocklet on the blocklet store. We are simply using the DID Connect React library for authentication as well as the payment kit. Perhaps I am looking at this the wrong way and if so could you direct me to the appropriate documentation?
z1d7y6YAr8bbXGQnwSFrP6RgnvVmRW2nsH6 do you know how?
have you tried:
npm install @blocklet/js-sdk
it's a publicly available package so that might work.
You can always build your blocklet and choose not to publish to anywhere, just hosting it on your server.
But you can use anything we provide when you are building the blocklet.