[英]How to install dependencies from package.json?
所以,我有一個需要一堆模塊的 NaticeScript 項目。 我熟悉 Node.Js,但對 NativeScript 不熟悉。 這是我的 package.json。 我無法運行該項目,因為它沒有所有模塊。
"dependencies": {
"@proplugins/nativescript-dom": "^2.2.1",
"@proplugins/nativescript-master-technology": "^1.2.0",
"@proplugins/nativescript-permissions": "^1.5.0",
"@proplugins/nativescript-platform-css": "^1.8.0",
"@proplugins/nativescript-purchase": "^4.0.1",
"@proplugins/nativescript-zxing": "^1.7.0",
"bad-words": "^3.0.3",
"guid-typescript": "^1.0.9",
"is-integer": "^1.0.7",
"is-number": "^7.0.0",
"is-positive-integer": "^1.1.1",
"is-url": "^1.2.4",
"js-seeder": "^1.0.1",
"nativescript-appavailability": "^1.3.2",
"nativescript-barcodescanner": "^3.4.2",
"nativescript-camera": "^4.5.0",
"nativescript-carousel": "^6.1.1",
"nativescript-effects": "^1.0.0",
"nativescript-image": "^3.0.5",
"nativescript-imagepicker": "^7.1.0",
"nativescript-iqkeyboardmanager": "^1.5.1",
"nativescript-masked-text-field": "^4.0.3",
"nativescript-phone": "^1.4.1",
"nativescript-plugin-firebase": "^10.5.2",
"nativescript-plugin-universal-links": "^1.0.1",
"nativescript-social-share": "^1.6.0",
"nativescript-ui-listview": "^8.1.0",
"nativescript-vibrate": "^3.0.0",
"tns-core-modules": "^6.5.1"
},
"devDependencies": {
"nativescript-dev-webpack": "^1.5.1",
"node-sass": "^4.13.1",
"sass-loader": "^8.0.2",
"typescript": "~3.5.3"
},
如何安裝所有這些依賴項? 我的節點版本是 8.9.4,NPM 版本是 5.6.0。 請不要問我為什么沒有最新的。 請建議使用 NPM 而不是 HomeBrew 等的方法。
我什至嘗試過:
tns plugin add nativescript-platform
npm i
和可能的一切。 但這抱怨找不到 nativescript-globalevents,當我安裝 globalscripts 時,它抱怨找不到平台!
我什至嘗試一個一個地添加模塊,但它總是給我錯誤
npm install @proplugins/nativescript-globalevents@1.3.0 --save
這導致:npm ERR: 404 Not Found。 @proplugins/nativescript-globalevents@1.3:0 僅供參考。 我已經安裝了 nativescript v6.8.0 謝謝!
嘗試$ tns install [--path]
--path - 指定包含 package.json 文件的目錄,如果與當前目錄不同。
對於特定模塊tns install <Module>
文檔是https://docs.nativescript.org/tooling/docs-cli/project/configuration/install
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.