-
I am trying to use the "deploy": {
"executor": "ngx-deploy-npm:deploy",
"options": {
"access": "public",
"dryRun": true,
"noBuild": true,
"distFolderPath": "dist/packages/somePackage/",
"registry": "https://****-internal-npm/"
}
}, Any help would be greatly appreciated! |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments
-
Identifying misconfiguration could be tricky. It depends so much on the context you are trying to do it, for instance, are you trying it in a local machine or ci? To try to identify the problem, it would be tremendously helpful to provide as much information as you can. This template could help. ### Current Behavior
<!-- What is the behavior that currently you experience? -->
### Expected Behavior
<!-- What is the behavior that you expect to happen? -->
### GitHub Repo
<!-- This is extremely important! If this issue is reproduce-able on https://github.com/nrwl/nx-examples, you may use that as the repo.
If not, please do take a few minutes of your time to create a repo to help us reproduce the issue.
This is the best way to help us reproduce the issue and fix it as soon as possible. -->
### Steps to Reproduce
<!-- Please provide some instructions to reproduce the issue in the repo provided above. Be as detailed as possible. -->
1.
### Nx Report
<!-- Please paste the contents shown by nx report. This will be automatically formatted into code, so no need for backticks. -->
### Failure Logs
<!-- Please include any relevant log snippets or files here -->
### Additional Information
<!-- Is there any additional information that you can provide? --> Pasting the command This might help to identify why it isn't working. There are some of the places that are at the top of my head:
It would be interesting to identify if something is already set up that npm is overwriting your instructions. For instance, env variables had the ultimate priority (I believe so). An info you might find helpful is that the option |
Beta Was this translation helpful? Give feedback.
-
Thanks for the quick response @dianjuar! We actually use that same template internally, haha, I should have filled out the information for throughly. Current BehaviorThe registry isn't set whenever you define it in options. Expected BehaviorThat whenever you define the registry in the option that it sets that registry, overwriting other places where it could have pulled from. GitHub RepoI don't have a public repo currently that I can show, however I think that you may be onto something above. Steps to ReproduceTry to publish and the deploy packages, gets another registry location. Nx Report Node : 16.19.1
OS : darwin arm64
npm : 8.19.3
nx : 15.8.6
@nrwl/js : 15.8.6
@nrwl/jest : 15.8.6
@nrwl/linter : 15.8.6
@nrwl/workspace : 15.8.6
@nrwl/cli : 15.8.6
@nrwl/cypress : 15.8.6
@nrwl/devkit : 15.8.6
@nrwl/eslint-plugin-nx : 15.8.6
@nrwl/nx-plugin : 15.8.6
@nrwl/storybook : 15.8.6
@nrwl/tao : 15.8.6
@nrwl/vite : 15.8.6
@nrwl/nx-cloud : 15.3.5
typescript : 4.9.5
---------------------------------------
Community plugins:
@jscutlery/semver : 2.30.1
@nxkit/style-dictionary : 2.3.0
ngx-deploy-npm : 5.2.0 Additional InformationThe output from our command Some background, we do set the registry earlier in our action to our public npm-proxy for running |
Beta Was this translation helpful? Give feedback.
-
Can we see the output of the |
Beta Was this translation helpful? Give feedback.
-
* Executing task: npx nx run ****:deploy
> nx run ****:deploy
📦 Building "****"
📦 Build target "****"
vite v4.3.3 building for production...
✓ 1 modules transformed.
../../../dist/packages/****/controllers/theme-context/index.js 2.63 kB │ gzip: 0.88 kB │ map: 8.96 kB
[vite-plugin-static-copy] Copied 2 items.
✓ built in 64ms
Dry-run: The package is not going to be published
npm
notice
npm notice 📦 ****@0.0.2-next.0
npm notice === Tarball Contents ===
npm notice 3.6kB README.md
npm
notice 814B package.json
npm notice === Tarball Details ===
npm notice
name: ****
npm notice version: 0.0.2-next.0
npm notice filename: ****-0.0.2-next.0.tgz
npm notice package size: 1.9 kB
npm notice unpacked size: 4.4 kB
npm notice shasum: 54deec2c7947473ea7abad6f98c7c0a6f60c93d1
npm notice integrity: sha512-JlRYiBqkD+/Ae[...]7o1i9ZZpH+GqQ==
npm notice total files: 2
npm notice
npm WARN This command requires you to be logged in to https://****/artifactory/api/npm/npm-public/ (dry-run)
npm notice Publishing to https://****/artifactory/api/npm/npm-public/ (dry-run)
+ ****@0.0.2-next.0
The options are:
{
"access": "public",
"registry": "https://****/artifactory/api/npm/****-internal-npm/",
"dryRun": true,
"noBuild": false
}
🚀 Successfully published via ngx-deploy-npm! Have a nice day! I forgot to add my dist target directory, but that's not really needed to showcase what happened. On my local machine, I know that I have the npm-public proxy set in my $HOME/.npmrc, so after reading what you wrote that made a lot of sense. |
Beta Was this translation helpful? Give feedback.
-
The output provided seems to work correctly in the environment you tested (the local machine, I believe). Also, I understand that you always want those libs to publish in your private repo. If that is the case, the I'd like to encourage you to make sure you have the proper configuration to, as a default, publish the libraries on your private repo. That can be done by modifying your lib's I was hoping you could take a look at the npm documentation about Preventing my package from being published on the official registry |
Beta Was this translation helpful? Give feedback.
-
I found the culprit last yesterday, I had a |
Beta Was this translation helpful? Give feedback.
I found the culprit last yesterday, I had a
.npmrc
file in my project's root that was pointing our scoped project always to a specific place. So no matter how much I created or changed it at the user level it was always being overridden by it. I appreciate you taking the time to look over this with me!