Apify Discord Mirror

Home
Members
milloome
m
milloome
Offline, last seen 5 months ago
Joined August 30, 2024
Hi, I find out that it seems that it's possible to tell apify to apply env variable also during build time only from the GUI like this, there's no other way? I'm creating actor via apify-cli using 'apify-cli push' and planning to automating it via github actions and obviously in this way will not work
1 comment
O
Hi everyone, nice to be here 😁

I am writing to you about a problem with private packages on an Actor JS/Typescript- Engine Node 18.

I followed these steps:
  • I created a secret with the NPM_GITHUB_TOKEN
  • checked the option from GUI "Apply environment variables also to the build process"
  • I added these lines to my Dockerfile
ARG NPM_GITHUB_TOKEN ENV NPM_GITHUB_TOKEN=$NPM_GITHUB_TOKEN
and tried printing the value of the NPM_GITHUB_TOKEN in the build (it works)
  • I correctly created the .npmrc file that uses the NPM_GITHUB_TOKEN
I always get this error:

npm ERR!
2023-12-02T07:09:42.306Z 401 Unauthorized - GET https://npm.pkg.github.com/download/.........

Locally everything works correctly.
Has anyone had and solved a similar problem? I searched in old posts but couldn't find anything.
Thanks
8 comments
L
A
m