You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
👋 Hi, thanks so much for creating this awesome tool to streamline the process of creating and publishing Node.js addon. I am following the https://napi.rs/docs/introduction/simple-package page to use it for the first time and had a good experience. I did ran into 2 issues however so I thought to drop some suggestions here.
Suggestion 1 is pertaining to the following statement in the doc
I'm using yarn to install the dependencies here, you can replace it by your favorite package manager.
I don't think the second half of this statement is correct. I initially used npm install to install dependency, but CI doesn't like it because it uses yarn as config and it was expecting to find a yarn.lock file, so I had to resort to yarn to generate the lock file to make CI happy.
The following was the error I ran into previously
Run actions/setup-node@v4
Found in cache @ /Users/runner/hostedtoolcache/node/18.19.0/x64
Environment details
/Users/runner/.yarn/bin/yarn --version
1.22.19
/Users/runner/.yarn/bin/yarn cache dir
/Users/runner/Library/Caches/Yarn/v6 Error: Dependencies lock file is not found in /Users/runner/work//. Supported file patterns: yarn.lock
(Log based on https://github.com/xitanggg/enigo-node-insert-text/actions/runs/7324902521/job/19948934147)
Suggestion 2 is pertaining to the following statement in the doc
In order to publish packages in GitHub Actions, you need to configure the NPM_TOKEN environment variable in your GitHub repo.
In the project Settings -> Secrets, add your NPM_TOKEN into it.
Environment secret, environment variable, repository secret are 3 different things. The CI.yml is actually using NPM_TOKEN as a repository secret secrets.NPM_TOKEN, so I'd suggest paraphrasing it with something like the following to make it more clear
In order to publish packages in GitHub Actions, you need to configure the NPM_TOKEN as a repository secret in your GitHub repo.
In the project Settings -> Secrets and variables -> Actions -> Repository secrets, add your NPM_TOKEN into it.
Thanks
The text was updated successfully, but these errors were encountered:
👋 Hi, thanks so much for creating this awesome tool to streamline the process of creating and publishing Node.js addon. I am following the https://napi.rs/docs/introduction/simple-package page to use it for the first time and had a good experience. I did ran into 2 issues however so I thought to drop some suggestions here.
Suggestion 1 is pertaining to the following statement in the doc
I don't think the second half of this statement is correct. I initially used
npm install
to install dependency, but CI doesn't like it because it uses yarn as config and it was expecting to find ayarn.lock
file, so I had to resort toyarn
to generate the lock file to make CI happy.The following was the error I ran into previously
Suggestion 2 is pertaining to the following statement in the doc
Environment secret, environment variable, repository secret are 3 different things. The
CI.yml
is actually usingNPM_TOKEN
as a repository secretsecrets.NPM_TOKEN
, so I'd suggest paraphrasing it with something like the following to make it more clearThanks
The text was updated successfully, but these errors were encountered: