मैं अपनी खुद की रिपॉजिटरीज़ को एक ऐसे प्रोजेक्ट की निर्भरता के रूप में रखना चाहता हूं जिस पर मैं काम कर रहा हूं। अभी मैं ऐसा करने के लिए एनपीएम लिंक का उपयोग कर रहा हूं। इसके अलावा, मैं चाहता हूं कि जब मैं npm इंस्टॉल का उपयोग करता हूं तो मुझे अपने भंडार में प्रकार का डेटा डालने के बजाय मुझे अपने उपयोगकर्ता नाम और पासवर्ड के लिए संकेत देना चाहूंगा। मैं उसको कैसे करू? यह अब ऐसा नहीं करता है।मैं अपने भंडार को package.json में निर्भरता कैसे बना सकता हूं और यह मुझे अपनी जानकारी के लिए संकेत दे सकता है?
मैं रिपोजिटरी की सामग्री को अपने फ़ोल्डर के रूप में दिखाना चाहता हूं समस्या यह है कि जब मैं एनपीएम इंस्टॉल करता हूं तो यह मुझे एनपीएम से त्रुटि संदेशों का एक गुच्छा देता है। तो मैंने दो चीजों की कोशिश की है। सबसे पहले मैं GitHub से एक सार्वजनिक रेपो क्लोनिंग की कोशिश की: अतः package.json में
लोक रेपो Github
, मैं इस तरह ssh प्रयोग किया है:
"dependencies": {
"repo_name": "[email protected]:ownername/reponame.git#84876fa5aasf55fssfsfafsa"
},
^ध्यान दें कि डेटा नकली है । # एक प्रतिबद्ध हैश है।
Warning: Permanently added the RSA host key for IP address '$IPADDRESS' to the list of known hosts.
Permission denied (publickey)
fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.
Code 128
तब मैं HTTPS की कोशिश की, फिर से एक प्रतिबद्ध हैश के साथ:
"dependencies": {
"repo_name": "https://github.com/ownername/reponame.git#84876fa5aasf55fssfsfafsa"
},
यह काम किया ..... तरह का
जब मैं NPM स्थापित भागा मुझे इस त्रुटि दे दी है । यह लिंक में रेपो से सभी डिप्टीज़ स्थापित करना प्रतीत होता था, लेकिन repo_name के लिंक में रेपो को क्लोन नहीं किया था, ऐसा लगता है कि यह कुछ भी क्लोन नहीं लग रहा था।
इसलिए मैंने एक अलग रेपो को आजमाने का फैसला किया। अपनी खुद की किसी भी निर्भरता के बिना। मैंने HTTPS का उपयोग किया .... यह काम नहीं किया। (हैश के लिए प्रतिबद्ध के साथ), यह मेरे समान त्रुटि संदेश देता है Bitbucket
जब मैं प्रदान की bitbucket स्ट्रिंग के माध्यम से ssh के माध्यम से मेरे निजी भंडार कोशिश
npm ERR! addLocal Could not install /tmp/npm-11929-4791330b/git-cache-2278328b/38b944c916c18cd4e004f07f2f476a4bb393ff8e
npm ERR! Linux 4.8.0-58-generic
npm ERR! argv "$nodepathname" "$npmpathname" "install"
npm ERR! node v7.0.0
npm ERR! npm v3.10.8
npm ERR! code EISDIR
npm ERR! errno -21
npm ERR! syscall read
npm ERR! eisdir EISDIR: illegal operation on a directory, read
npm ERR! eisdir This is most likely not a problem with npm itself
npm ERR! eisdir and is related to npm not being able to find a package.json in
npm ERR! eisdir a package you are trying to install.
निजी भंडार:
मैं इन त्रुटियों को मिल गया अन्य भंडार के साथ, यह मुझसे कहता है:
Please make sure you have the correct access rights
npm ERR! code 128
npm ERR! Permission denied (publickey).
npm ERR! fatal: Could not read from remote repository.
npm ERR!
npm ERR! Please make sure you have the correct access rights
npm ERR! and the repository exists.
npm ERR!
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
यह मुझे एक उपयोगकर्ता नाम या पासवर्ड के लिए संकेत नहीं है।
निजी रेपो पर https का उपयोग करना (हैश के लिए प्रतिबद्ध के साथ, समान रूप से पहले) मेरे मुझे किसी भी उपयोगकर्ता नाम के साथ संकेत दिए बिना एक समान त्रुटि देता है:
remote: Invalid username or password. If you log in via a third party service you must ensure you have an account password set in your account profile.
npm ERR! code 128