2017-12-22 16 views
0

を実行する方法を私はnativescript-グーグルマップ-SDKプラグイン Nativescriptは - プラグインのデモ

をクローン化し、「デモ」フォルダ内のアプリケーションを実行したいと思います。

どうすればよいですか?

は私がデモフォルダに行き、 tns build iOS

がうまく働い型付け、その後

tns run iOS

私はエラー

Could not find module 'nativescript-google-maps-sdk'

これが最後のエラーで得ました:

file:///app/main-page.js:3:25: JS ERROR Error: Could not find module 'nativescript-google-maps-sdk'. Computed path '/Users/asrock/Library/Developer/CoreSimulator/Devices/2462B1E0-F0D5-4EC5-B31B-1A5AE8CACC74/data/Containers/Bundle/Application/DD86BB36-6F11-437C-B6CA-9F936478E87D/demo.app/app/tns_modules/nativescript-google-maps-sdk'.

/node_modulesではなく/ tns_modulesの下にgoogle sdkがあります。

答えて

0

デモアプリケーションはプラグインの場所を知らないようです。 plugin.prepareまたはplugin.linkの行に沿って何かが必要な場合があります。linkの場合は、prepareの設定方法によっては便利かもしれません。上部のtscがすべての電話番号をnpm run tscに変更することを忘れないでください。また<<<<YOUR-PLUGIN-NAME>>>>を実際のプラグイン名に置き換えることを忘れないでください。通常はnativescript-volumeのようなものです。

// In the official plugin seed src/package.json 
// https://github.com/NativeScript/nativescript-plugin-seed 

"scripts": { 
    "tsc": "tsc -skipLibCheck", 
    "build": "npm i && tsc", 
    "postclone": "npm i && node scripts/postclone.js && cd ../demo && npm i && cd ../src && npm run plugin.link", 
    "test.android": "npm i && npm run tsc && npm run tslint && cd ../demo && tns build android && tns test android --justlaunch", 
    "test.ios": "npm i && npm run tsc && npm run tslint && cd ../demo && tns build ios && tns test ios --justlaunch", 
    "tslint": "cd .. && tslint \"**/*.ts\" --config tslint.json --exclude \"**/node_modules/**\"", 
    "plugin.link": "npm link && cd ../demo && npm link <<<<YOUR-PLUGIN-NAME>>>> && cd ../src", 
    "plugin.tscwatch": "npm run tsc -- -w", 
    "demo.ios": "npm i && npm run tsc && cd ../demo && tns run ios --syncAllFiles", 
    "demo.android": "npm i && npm run tsc && cd ../demo && tns run android --syncAllFiles", 
    "demo.reset": "cd ../demo && rimraf platforms", 
    "plugin.prepare": "npm run tsc && cd ../demo && tns plugin remove <<<<YOUR-PLUGIN-NAME>>>> && tns plugin add ../src", 
    "clean": "cd ../demo && rimraf hooks node_modules platforms && cd ../src && rimraf node_modules && npm run plugin.link", 
    "ci.tslint": "npm i && tslint '**/*.ts' --config '../tslint.json' --exclude '**/node_modules/**'" 
}, 
+0

nativescript-google-maps-sdkのデモフォルダをまだ実行しようとしています。私はデモフォルダにCDを作成し、tnsはiOSを実行し、それはアプリを作成してシミュレータに送信するようだが、起動時にクラッシュする。私は私のOPと同じエラーを受けます。 – dashman

+0

もっと早くこれを見ていないことに対する謝罪...私はデモを実行して、私が同じことをするかどうかを試してみるつもりです。 – Jarvis

+0

ビルドすることさえできませんでした。 :/ /あなたに何を伝えるべきかわからない。それはすべてのファイルをコピーしていないようだ... 'tnsを実行しようとしましたios --syncAllFiles'ちょうど何かをスキップしているかどうかを確認するには? – Jarvis

関連する問題