Cli: npm تنشر 404 Not Found - PUT

تم إنشاؤها على ٧ أغسطس ٢٠٢٠  ·  3تعليقات  ·  مصدر: npm/cli

أقرب مشكلة هي # 1626 ولكنها تتعلق باستخدام npm للحصول على الحزمة ، ويبدو أنها تم حلها لمعظم المستخدمين.
هنا يتعلق الأمر بحزمة نشر npm في CI ، ولم يتم حلها في الوقت الحالي.

السلوك الحالي:

https://framagit.org/1000i100/g1lien/-/jobs/1072053

$ npm publish
[...]
npm ERR! code E404
npm ERR! 404 Not Found - PUT https://registry.npmjs.org/g1link - Not found
npm ERR! 404 
npm ERR! 404  '[email protected]' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404 
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
[...]

سلوك متوقع:

النشر الناجح لحزمي من عامل ميناء في gitlab-CI مع مصادقة npm_token.
(يعمل بالأمس على الكمبيوتر المحمول الخاص بي مع تسجيل الدخول إلى npm ، ولكن ليس مع npm_token في CI).

خطوات الاستنساخ:

السابق. خطوات إعادة إنتاج السلوك:

  1. افرق هذا: https://framagit.org/1000i100/g1lien
  2. قم بتغيير اسم الحزمة وإضافة رمز npm المميز الخاص بك
  3. ادفعه بعلامة على gitlab مع CI active.

يجب أن يعيد إنتاج المشكلة.

بيئة:

https://framagit.org/1000i100/g1lien/-/blob/master/.gitlab-ci.yml#L5
https://framagit.org/1000i100/g1lien/-/jobs/1072052#L17

  • نظام التشغيل: Docker in gitlab with image: node: current
  • العقدة: v14.7.0
  • NPM: 6.14.7

التعليق الأكثر فائدة

كنت أحاول الحصول على npm publish من جهاز جديد وحصلت على نفس الرقم غير المتوقع 404. في حالتي تم حلها بـ npm login . أدرك أن 401 يمكن أن "يتسرب" من وجود حزمة خاصة ، لكنني أعتقد أن CLI سوف تتحقق أولاً لمعرفة ما إذا كنت قد تمت مصادقيتي أولاً والرد بخطأ أكثر ملاءمة.

هذا هو الجزء ذي الصلة من السجل عندما حاولت npm publish قبل npm login :

19 verbose stack Error: 404 Not Found - PUT https://registry.npmjs.org/mock-fs - Not found
19 verbose stack     at /Users/tschaub/.nvm/versions/node/v14.8.0/lib/node_modules/npm/node_modules/npm-registry-fetch/check-response.js:117:15
19 verbose stack     at processTicksAndRejections (internal/process/task_queues.js:93:5)
20 verbose statusCode 404
21 verbose pkgid [email protected]
22 verbose cwd /Users/tschaub/projects/mock-fs
23 verbose Darwin 19.6.0
24 verbose argv "/Users/tschaub/.nvm/versions/node/v14.8.0/bin/node" "/Users/tschaub/.nvm/versions/node/v14.8.0/bin/npm" "publish"
25 verbose node v14.8.0
26 verbose npm  v6.14.8
27 error code E404
28 error 404 Not Found - PUT https://registry.npmjs.org/mock-fs - Not found
29 error 404
30 error 404 '[email protected]' is not in the npm registry.
31 error 404 You should bug the author to publish it (or use the name yourself!)
32 error 404 Note that you can also install from a
33 error 404 tarball, folder, http url, or git url.
34 verbose exit [ 1, true ]

ال 3 كومينتر

نفس الخطأ.

كان الإصدار الأخير 30.07 ناجحًا. ولكن منذ 11.08 يظهر لي هذا الخطأ عند النشر:
2020-08-13T09: 56: 54.1669946Z 18 http جلب PUT 404 https://registry.npmjs.org/@aurigma٪2fui-framework 5611ms
2020-08-13T09: 56: 54.1670114Z 19 خطأ مكدس مطول: 404 غير موجود - ضع https://registry.npmjs.org/@aurigma٪2fui-framework - غير موجود

كنت أحاول الحصول على npm publish من جهاز جديد وحصلت على نفس الرقم غير المتوقع 404. في حالتي تم حلها بـ npm login . أدرك أن 401 يمكن أن "يتسرب" من وجود حزمة خاصة ، لكنني أعتقد أن CLI سوف تتحقق أولاً لمعرفة ما إذا كنت قد تمت مصادقيتي أولاً والرد بخطأ أكثر ملاءمة.

هذا هو الجزء ذي الصلة من السجل عندما حاولت npm publish قبل npm login :

19 verbose stack Error: 404 Not Found - PUT https://registry.npmjs.org/mock-fs - Not found
19 verbose stack     at /Users/tschaub/.nvm/versions/node/v14.8.0/lib/node_modules/npm/node_modules/npm-registry-fetch/check-response.js:117:15
19 verbose stack     at processTicksAndRejections (internal/process/task_queues.js:93:5)
20 verbose statusCode 404
21 verbose pkgid [email protected]
22 verbose cwd /Users/tschaub/projects/mock-fs
23 verbose Darwin 19.6.0
24 verbose argv "/Users/tschaub/.nvm/versions/node/v14.8.0/bin/node" "/Users/tschaub/.nvm/versions/node/v14.8.0/bin/npm" "publish"
25 verbose node v14.8.0
26 verbose npm  v6.14.8
27 error code E404
28 error 404 Not Found - PUT https://registry.npmjs.org/mock-fs - Not found
29 error 404
30 error 404 '[email protected]' is not in the npm registry.
31 error 404 You should bug the author to publish it (or use the name yourself!)
32 error 404 Note that you can also install from a
33 error 404 tarball, folder, http url, or git url.
34 verbose exit [ 1, true ]

نعم ، npm login يساعد. قبل أيام قليلة اكتشفت هذا أيضًا. لكن لا يزال من غير الواضح لماذا اضطررت إلى إعادة التفويض
يجب أن تحسن Npm رسائل الخطأ الخاصة بهم.

هل كانت هذه الصفحة مفيدة؟
0 / 5 - 0 التقييمات