Thanks for the help. Working on this now.
I can’t get 8base-sdk
to install/set up correctly. I consistently get runtime output about missing dependencies after doing npm install 8base-sdk
. I’m not using Apollo or React.
I do get an install-time message about required peer dependencies (@apollo/client
and graphql
). I don’t want to use these packages and am concerned about bundle sizes and dependency management.
I did an initial pass to set up the SDK in my client based on the Vue sample app you linked to, and I didn’t see any part of the code that would actually need any of this, since I’m using graphql-request
for doing the GraphQL communication. Still, the package.json
looks like this:
"dependencies": {
"@apollo/client": "^3.4.10",
"8base-sdk": "^2.5.1",
"apollo-cache-inmemory": "^1.6.6",
"apollo-client": "^2.6.10",
"apollo-link-context": "^1.0.20",
"apollo-link-error": "^1.1.13",
"apollo-link-http": "^1.5.17",
"core-js": "^2.6.5",
"graphql-request": "^3.5.0",
"graphql-tag": "^2.12.5",
"react": "^17.0.2"
}
Are these extra packages really necessary? Or is there something wrong with how this builds on my end?
Full output when I load up my page (on Nuxt3):
> node_modules/@8base/apollo-client/dist/index.js:20:25: error: Could not resolve "@apollo/client" (mark it as external to exclude it from the bundle, or surround it with try/catch to handle the failure at run-time)
20 │ const client_1 = require("@apollo/client");
> node_modules/@8base/apollo-links/dist/SubscriptionLink.js:13:21: error: Could not resolve "@apollo/client/link/ws" (mark it as external to exclude it from the bundle, or surround it with try/catch to handle the failure at run-time)
13 │ const ws_1 = require("@apollo/client/link/ws");
> node_modules/@8base/apollo-client/dist/index.js:22:29: error: Could not resolve "@apollo/client/link/batch-http" (mark it as external to exclude it from the bundle, or surround it with try/catch to handle the failure at run-time)
22 │ const batch_http_1 = require("@apollo/client/link/batch-http");
> node_modules/@8base/apollo-links/dist/SignUpLink.js:32:25: error: Could not resolve "@apollo/client" (mark it as external to exclude it from the bundle, or surround it with try/catch to handle the failure at run-time)
32 │ const client_1 = require("@apollo/client");
> node_modules/@8base/apollo-links/dist/AuthHeadersLink.js:24:25: error: Could not resolve "@apollo/client" (mark it as external to exclude it from the bundle, or surround it with try/catch to handle the failure at run-time)
24 │ const client_1 = require("@apollo/client");
> node_modules/@8base/apollo-links/dist/TokenRefreshLink.js:24:25: error: Could not resolve "@apollo/client" (mark it as external to exclude it from the bundle, or surround it with try/catch to handle the failure at run-time)
24 │ const client_1 = require("@apollo/client");
> node_modules/@8base/apollo-links/dist/AuthLink.js:4:25: error: Could not resolve "@apollo/client" (mark it as external to exclude it from the bundle, or surround it with try/catch to handle the failure at run-time)
4 │ const client_1 = require("@apollo/client");
> node_modules/@8base/apollo-client/dist/index.js:23:24: error: Could not resolve "@apollo/client/link/error" (mark it as external to exclude it from the bundle, or surround it with try/catch to handle the failure at run-time)
23 │ const error_1 = require("@apollo/client/link/error");
> node_modules/@8base/apollo-links/dist/SignUpLink.js:33:24: error: Could not resolve "@apollo/client/link/utils" (mark it as external to exclude it from the bundle, or surround it with try/catch to handle the failure at run-time)
33 │ const utils_1 = require("@apollo/client/link/utils");
> node_modules/@8base/apollo-links/dist/SuccessLink.js:5:25: error: Could not resolve "@apollo/client" (mark it as external to exclude it from the bundle, or surround it with try/catch to handle the failure at run-time)
5 │ const client_1 = require("@apollo/client");
> node_modules/@8base/apollo-links/dist/utils/index.js:28:28: error: Could not resolve "@apollo/client/utilities" (mark it as external to exclude it from the bundle, or surround it with try/catch to handle the failure at run-time)
28 │ const utilities_1 = require("@apollo/client/utilities");
> node_modules/@8base/apollo-client/dist/index.js:24:46: error: Could not resolve "graphql-tag" (mark it as external to exclude it from the bundle, or surround it with try/catch to handle the failure at run-time)
24 │ const graphql_tag_1 = __importDefault(require("graphql-tag"));
> node_modules/@8base/apollo-links/dist/graphql/mutations.js:4:25: error: Could not resolve "@apollo/client" (mark it as external to exclude it from the bundle, or surround it with try/catch to handle the failure at run-time)
4 │ const client_1 = require("@apollo/client");