I get the following error when trying to host my Angular application on Vercel:
Error: src/app/spotify.service.ts:25:32 - error TS2339: Property 'spotifyApiKey' does not exist on type '{ production: boolean; }'.
This makes sense since the property spotifyApiKey
is set by a JavaScript script that is called in package.json
. So my question is how do I tell Vercel to first run the commands in the package.json
file?
CodePudding user response:
This makes sense since the property spotifyApiKey is set by a JavaScript script that is called in package.json.
Okay, but you haven't properly typed it. The type should be:
{ production: boolean, spotifyApiKey: string }
Yes the key may be inserted later, but you need to clarify that the property exists.
It's also possible you need to change some other code but since you haven't posted at least the service we can't help you further.
CodePudding user response:
check out CICD for better understanding
though reading up on how to create jobs through .yaml files is how to instruct build steps/ jobs/ tests/ etc