NativeScript / ios-jsc

NativeScript for iOS using JavaScriptCore
http://docs.nativescript.org/runtimes/ios
Apache License 2.0
298 stars 59 forks source link

i'm trying to add a 3rd party nativescript library .It got a error like this... #783

Closed priyangamani closed 7 years ago

priyangamani commented 7 years ago

i'm trying to add a tns plugin add ../nativescript-payment by using node version v.8.2.1. It got a error like this...

Error File npm ERR! code ENOLOCAL npm ERR! Could not install from "../nativescript-payment" as it does not contain a package.json file. npm ERR! A complete log of this run can be found in: npm ERR! /Users/macadmin/.npm/_logs/2017-08-03T10_58_50_404Z-debug.log

2017-08-03T10_58_50_404Z-debug.log 0 info it worked if it ends with ok 1 verbose cli [ '/usr/local/bin/node', 1 verbose cli '/usr/local/bin/npm', 1 verbose cli 'install', 1 verbose cli '../nativescript-payment', 1 verbose cli '--save' ] 2 info using npm@3.3.12 3 info using node@v5.5.0 4 silly loadCurrentTree Starting 5 silly install loadCurrentTree 6 silly install readLocalPackageData 7 silly fetchPackageMetaData ../nativescript-payment 8 silly fetchOtherPackageData ../nativescript-payment 9 silly cache add args [ '../nativescript-payment, null ] 10 verbose cache add spec ../nativescript-payment 11 silly cache add parsed spec Result { 11 silly cache add raw: '../nativescript-payment, 11 silly cache add scope: null, 11 silly cache add name: null, 11 silly cache add rawSpec: '../nativescript-payment', 11 silly cache add spec: '/Users/macadmin/nativescript-payment, 11 silly cache add type: 'local' } 12 error addLocal Could not install /Users/macadmin/nativescript-payment 13 silly fetchPackageMetaData Error: ENOENT: no such file or directory, open '/Users/macadmin/nativescript-payment' 13 silly fetchPackageMetaData at Error (native) 13 silly fetchPackageMetaData error for ../nativescript-payment{ [Error: ENOENT: no such file or directory, open '/Users/macadmin/nativescript-payment'] 13 silly fetchPackageMetaData errno: -2, 13 silly fetchPackageMetaData code: 'ENOENT', 13 silly fetchPackageMetaData syscall: 'open', 13 silly fetchPackageMetaData path: '/Users/macadmin/nativescript-payment' } 14 silly rollbackFailedOptional Starting 15 silly rollbackFailedOptional Finishing 16 silly runTopLevelLifecycles Starting 17 silly runTopLevelLifecycles Finishing 18 silly install printInstalled 19 verbose stack Error: ENOENT: no such file or directory, open '/Users/macadmin/ nativescript-payment' 19 verbose stack at Error (native) 20 verbose cwd /Users/macadmin/HelloWorld 21 error Darwin 16.6.0 22 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "../nativescript-payment" "--save" 23 error node v5.5.0 24 error npm v3.3.12 25 error path /Users/macadmin/nativescript-payment 26 error code ENOENT 27 error errno -2 28 error syscall open 29 error enoent ENOENT: no such file or directory, open '/Users/macadmin/nativescript-payment' 29 error enoent This is most likely not a problem with npm itself 29 error enoent and is related to npm not being able to find a file. 30 verbose exit [ -2, true ]

Plugin structure For Ios I created a plugin structure as below: ├── package.json └── platforms └── ios ├── include │ └──payment │ ├── Api.h │ └──api.a

And in package.json: { "name" : "nativescript-payment", "version": "0.0.1", "nativescript": { "platforms": { "ios": "1.3.0" } } }

dtopuzov commented 7 years ago

Closing in favor of https://github.com/NativeScript/nativescript-cli/issues/3035