Developer Console React App Deploy and SDK Issues

Hello,

We’re run into a couple of issues while trying to build our app, a react SPA hosted through the Developer Console and a Code Repository.

First, we need to support file uploading to media references in object sets, which requires us to use the beta SDK release channel. A recent change has caused every action call we want to make require an additional parameter, $objectModifier. We’re not sure how we’d set this, and it’s preventing us from being able to use the media set upload API.

Second, in Code Repository, our “checks” are failing. We have a branch that worked yesterday, and today, after just a white space change, the build has begun failing. Here are our error logs:

npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: legal-document-analysis@0.0.0
npm WARN Found: @types/node@22.13.10
npm WARN node_modules/@types/node
npm WARN   dev @types/node@"latest" from the root project
npm WARN   3 more (@types/node-fetch, vite, vitest)
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peerOptional @types/node@"^18.0.0 || >=20.0.0" from vite@5.4.14
npm WARN node_modules/vite
npm WARN   dev vite@"^5.4.8" from the root project
npm WARN   4 more (@vitejs/plugin-react, @vitest/mocker, vite-node, vitest)
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: legal-document-analysis@0.0.0
npm WARN Found: @types/node@22.13.10
npm WARN node_modules/@types/node
npm WARN   dev @types/node@"latest" from the root project
npm WARN   3 more (@types/node-fetch, vite, vitest)
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peerOptional @types/node@"^18.0.0 || >=20.0.0" from vite@5.4.14
npm WARN node_modules/vite
npm WARN   dev vite@"^5.4.8" from the root project
npm WARN   4 more (@vitejs/plugin-react, @vitest/mocker, vite-node, vitest)
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: legal-document-analysis@0.0.0
npm WARN Found: @types/node@22.13.10
npm WARN node_modules/@types/node
npm WARN   dev @types/node@"latest" from the root project
npm WARN   3 more (@types/node-fetch, vite, vitest)
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peerOptional @types/node@"^18.0.0 || >=20.0.0" from vitest@2.1.9
npm WARN node_modules/vitest
npm WARN   dev vitest@"^2.1.2" from the root project
npm ERR! code E403
npm ERR! 403 403 Forbidden - GET https://<foundry-******>/compute/fc27e2/foundry/foundry-artifacts-api-mesh/artifacts/api/repositories/ri.stemma.main.repository.npm_***/contents/release/npm/@types%2fnode
npm ERR! 403 In most cases, you or one of your dependencies are requesting
npm ERR! 403 a package version that is forbidden by your security policy, or
npm ERR! 403 on a server you do not have access to.

Greatly appreciate any help on these.

Hey jtbkcb,

I am not seeing $objectModifier in our codebase. Do you mean $objectSpecifier?Assuming so, it looks like we reused a type in 2 places causing you to see this. From this I assume you are calling applyAction one of two ways:

// first, manually specify object details
client(doFoo).applyAction({ foo: { $objectType: ... $primaryKey ...} })`. 

// second, just passing an object in from a prior load
const myFoo: Osdk.Instance<Foo> = loadMyFoo();
client(doFoo).applyAction({ foo: myFoo })

If its the first one, then this was just a mistake on our types in the beta and we will fix it. For now, you can just pass any string in for $objectSpecifier. In a future update we will take that requirement out so we don’t break backwards compatibility with calling actions.

If its the second one, then there may be a mismatch in versions between @osdk/client and @osdk/api (they should be the same).

(Will respond in followup for your second issue).

Regarding your ability to install packages, the error at the bottom is most telling to me.

npm ERR! 403 403 Forbidden - GET https://<foundry-******>/compute/fc27e2/foundry/foundry-artifacts-api-mesh/artifacts/api/repositories/ri.stemma.main.repository.npm_***/contents/release/npm/@types%2fnode
npm ERR! 403 In most cases, you or one of your dependencies are requesting
npm ERR! 403 a package version that is forbidden by your security policy, or
npm ERR! 403 on a server you do not have access to.

If nothing else changed but whitespace, then this suggests the FOUNDRY_TOKEN you are using to fetch packages either isn’t set or has expired.

  1. If you are doing this from your own local machine, then you can go to Developer Console and get a new one.
  2. If you are doing this from the IDE in the web, then I am out of my depths and I will ask an expert in that to look at this. I think we automatically inject one of those for you in that case and just stopping and starting your developer instance might fix it.

Thanks for the help. The permissions issue was from our moving a code repository between folders, moving it back resolved things. Your suggestion to simply supply a string has solved the action invocation, as well.