I have set up an Azure DevOps Artifacts Feed for NPM.
I followed the Instructions on https://docs.microsoft.com/en-us/azure/devops/artifacts/get-started-npm?view=azure-devops&tabs=windows
In the next Step, I wanted to publish packages from a “node_modules” Directory within a Visual Studio Project that got its packages from the Public source.
I thought if I run “npm publish” next to my custom “.npmrc” and “package.json” File it would publish all my libraries from the “node_modules” directory. Instead, it published my VisualStudio Project, which uses these libraries. It even followed the Git Ignore rules to not include the “node_modules” folder …
What would be the default way to publish the packages I depend on?
Do I have to write a script to do it for every single Package manually?
What do I with prebuild requiring packages?
After I ran a simple script a couple packages failed.
script:
for /d %i in (C:\Path\node_modules\*) do ( cd "%i" & npm publish )
Error:
…
6 warn prepublish-on-install As of npm@5, `prepublish` scripts are deprecated.
7 warn prepublish-on-install Use `prepare` for build steps and `prepublishOnly` for upload-only.
8 warn prepublish-on-install See the deprecation note in `npm help scripts` for more information.
…
23 error code ELIFECYCLE
24 error errno 1
25 error [email protected] prepublish: `node scripts/generate-grammar.js < lib/grammar.pegjs > lib/generated-parser.js`
25 error Exit status 1
26 error Failed at the [email protected] prepublish script.
…
I saw these packages have their own sub packages : /
PS: My DevOps server and workstation do not have direct access to public Networks!
Thanks for any Help!