Yermo / nativescript-mapbox

:statue_of_liberty: :tokyo_tower: :mount_fuji: Native OpenGL powered Maps, by Mapbox
MIT License
194 stars 94 forks source link

Build fails for Android under Ubuntu Linux. #289

Open Yermo opened 5 years ago

Yermo commented 5 years ago

I cloned master.

From the nativescript-mapbox/src directory I ran

npm run setupandinstall

I am getting npm errors:

npm WARN tar ENOENT: no such file or directory, open '/Projects/nativescript-mapbox/demo/node_modules/.staging/postcss-a7313b86/lib/list.js'
npm WARN tar ENOENT: no such file or directory, open '/Projects/nativescript-mapbox/demo/node_modules/.staging/postcss-a7313b86/lib/map-generator.js'
npm WARN tar ENOENT: no such file or directory, open '/Projects/nativescript-mapbox/demo/node_modules/.staging/source-map-cec31b0f/dist/source-map.js'
npm WARN tar ENOENT: no such file or directory, open '/Projects/nativescript-mapbox/demo/node_modules/.staging/tough-cookie-101be538/lib/store.js'
npm WARN tar ENOENT: no such file or directory, open '/Projects/nativescript-mapbox/demo/node_modules/.staging/typescript-2b55b080/lib/lib.es5.d.ts'
npm WARN tar ENOENT: no such file or directory, open '/Projects/nativescript-mapbox/demo/node_modules/.staging/ajv-9f89d39a/dist/ajv.min.js.map'
npm WARN tar ENOENT: no such file or directory, open '/Projects/nativescript-mapbox/demo/node_modules/.staging/tslint-748165ee/lib/verify/lines.d.ts'
npm WARN tar ENOENT: no such file or directory, open '/Projects/nativescript-mapbox/demo/node_modules/.staging/tslint-748165ee/lib/verify/lines.js'
npm WARN tar ENOENT: no such file or directory, open '/Projects/nativescript-mapbox/demo/node_modules/.staging/tslint-748165ee/lib/verify/lintError.d.ts'
npm WARN tar ENOENT: no such file or directory, open '/Projects/nativescript-mapbox/demo/node_modules/.staging/tslint-748165ee/lib/verify/lintError.js'
npm WARN tar ENOENT: no such file or directory, open '/Projects/nativescript-mapbox/demo/node_modules/.staging/tslint-748165ee/lib/verify/parse.d.ts'
npm WARN tar ENOENT: no such file or directory, open '/Projects/nativescript-mapbox/demo/node_modules/.staging/tslint-748165ee/lib/verify/parse.js'
npm WARN tar ENOENT: no such file or directory, open '/Projects/nativescript-mapbox/demo/node_modules/.staging/tslint-748165ee/lib/language/formatter/abstractFormatter.d.ts'
npm WARN tar ENOENT: no such file or directory, open '/Projects/nativescript-mapbox/demo/node_modules/.staging/tslint-748165ee/lib/language/formatter/abstractFormatter.js'
npm WARN tar ENOENT: no such file or directory, open '/Projects/nativescript-mapbox/demo/node_modules/.staging/tslint-748165ee/lib/language/formatter/formatter.d.ts'
npm WARN tar ENOENT: no such file or directory, open '/Projects/nativescript-mapbox/demo/node_modules/.staging/tslint-748165ee/lib/language/formatter/formatter.js'
npm WARN tar ENOENT: no such file or directory, open '/Projects/nativescript-mapbox/demo/node_modules/.staging/tslint-748165ee/lib/language/rule/abstractRule.d.ts'
npm WARN tar ENOENT: no such file or directory, open '/Projects/nativescript-mapbox/demo/node_modules/.staging/tslint-748165ee/lib/language/rule/abstractRule.js'
npm WARN tar ENOENT: no such file or directory, open '/Projects/nativescript-mapbox/demo/node_modules/.staging/tslint-748165ee/lib/language/rule/optionallyTypedRule.d.ts'
npm WARN tar ENOENT: no such file or directory, open '/Projects/nativescript-mapbox/demo/node_modules/.staging/tslint-748165ee/lib/language/rule/optionallyTypedRule.js'
npm WARN tar ENOENT: no such file or directory, open '/Projects/nativescript-mapbox/demo/node_modules/.staging/tslint-748165ee/lib/language/rule/rule.d.ts'
npm WARN tar ENOENT: no such file or directory, open '/Projects/nativescript-mapbox/demo/node_modules/.staging/tslint-748165ee/lib/language/rule/rule.js'
npm WARN tar ENOENT: no such file or directory, open '/Projects/nativescript-mapbox/demo/node_modules/.staging/tslint-748165ee/lib/language/rule/typedRule.d.ts'
npm WARN tar ENOENT: no such file or directory, open '/Projects/nativescript-mapbox/demo/node_modules/.staging/tslint-748165ee/lib/language/rule/typedRule.js'
npm WARN tar ENOENT: no such file or directory, open '/Projects/nativescript-mapbox/demo/node_modules/.staging/tslint-748165ee/lib/language/walker/blockScopeAwareRuleWalker.d.ts'
npm WARN tar ENOENT: no such file or directory, open '/Projects/nativescript-mapbox/demo/node_modules/.staging/tns-platform-declarations-bb391d36/android/android-platform-19.d.ts'
npm WARN tar ENOENT: no such file or directory, open '/Projects/nativescript-mapbox/demo/node_modules/.staging/tslint-748165ee/lib/language/walker/blockScopeAwareRuleWalker.js'
npm WARN tar ENOENT: no such file or directory, open '/Projects/nativescript-mapbox/demo/node_modules/.staging/tslint-748165ee/lib/language/walker/index.d.ts'
npm WARN tar ENOENT: no such file or directory, open '/Projects/nativescript-mapbox/demo/node_modules/.staging/tslint-748165ee/lib/language/walker/index.js'
npm WARN tar ENOENT: no such file or directory, open '/Projects/nativescript-mapbox/demo/node_modules/.staging/tslint-748165ee/lib/language/walker/programAwareRuleWalker.d.ts'
npm WARN tar ENOENT: no such file or directory, open '/Projects/nativescript-mapbox/demo/node_modules/.staging/tslint-748165ee/lib/language/walker/programAwareRuleWalker.js'
npm WARN tar ENOENT: no such file or directory, open '/Projects/nativescript-mapbox/demo/node_modules/.staging/tslint-748165ee/lib/language/walker/ruleWalker.d.ts'
npm WARN tar ENOENT: no such file or directory, open '/Projects/nativescript-mapbox/demo/node_modules/.staging/tslint-748165ee/lib/language/walker/ruleWalker.js'
npm WARN tar ENOENT: no such file or directory, open '/Projects/nativescript-mapbox/demo/node_modules/.staging/tslint-748165ee/lib/language/walker/scopeAwareRuleWalker.d.ts'
npm WARN tar ENOENT: no such file or directory, open '/Projects/nativescript-mapbox/demo/node_modules/.staging/tslint-748165ee/lib/language/walker/scopeAwareRuleWalker.js'
npm WARN tar ENOENT: no such file or directory, open '/Projects/nativescript-mapbox/demo/node_modules/.staging/tslint-748165ee/lib/language/walker/syntaxWalker.d.ts'
npm WARN tar ENOENT: no such file or directory, open '/Projects/nativescript-mapbox/demo/node_modules/.staging/tslint-748165ee/lib/language/walker/syntaxWalker.js'
npm WARN tar ENOENT: no such file or directory, open '/Projects/nativescript-mapbox/demo/node_modules/.staging/tslint-748165ee/lib/language/walker/walkContext.d.ts'
npm WARN tar ENOENT: no such file or directory, open '/Projects/nativescript-mapbox/demo/node_modules/.staging/tslint-748165ee/lib/language/walker/walkContext.js'
npm WARN tar ENOENT: no such file or directory, open '/Projects/nativescript-mapbox/demo/node_modules/.staging/tslint-748165ee/lib/language/walker/walker.d.ts'
npm WARN tar ENOENT: no such file or directory, open '/Projects/nativescript-mapbox/demo/node_modules/.staging/tslint-748165ee/lib/language/walker/walker.js'
npm WARN tar ENOENT: no such file or directory, open '/Projects/nativescript-mapbox/demo/node_modules/.staging/tslint-748165ee/lib/rules/completed-docs/blockExclusion.d.ts'
npm WARN tar ENOENT: no such file or directory, open '/Projects/nativescript-mapbox/demo/node_modules/.staging/tslint-748165ee/lib/rules/completed-docs/blockExclusion.js'
npm WARN tar ENOENT: no such file or directory, open '/Projects/nativescript-mapbox/demo/node_modules/.staging/tslint-748165ee/lib/rules/completed-docs/classExclusion.d.ts'
npm WARN tar ENOENT: no such file or directory, open '/Projects/nativescript-mapbox/demo/node_modules/.staging/tslint-748165ee/lib/rules/completed-docs/classExclusion.js'
npm WARN tar ENOENT: no such file or directory, open '/Projects/nativescript-mapbox/demo/node_modules/.staging/tslint-748165ee/lib/rules/completed-docs/exclusion.d.ts'
npm WARN tar ENOENT: no such file or directory, open '/Projects/nativescript-mapbox/demo/node_modules/.staging/tslint-748165ee/lib/rules/completed-docs/exclusion.js'
npm WARN tar ENOENT: no such file or directory, open '/Projects/nativescript-mapbox/demo/node_modules/.staging/tslint-748165ee/lib/rules/completed-docs/exclusionDescriptors.d.ts'
npm WARN tar ENOENT: no such file or directory, open '/Projects/nativescript-mapbox/demo/node_modules/.staging/tslint-748165ee/lib/rules/completed-docs/exclusionDescriptors.js'
npm WARN tar ENOENT: no such file or directory, open '/Projects/nativescript-mapbox/demo/node_modules/.staging/tslint-748165ee/lib/rules/completed-docs/exclusionFactory.d.ts'
npm WARN tar ENOENT: no such file or directory, open '/Projects/nativescript-mapbox/demo/node_modules/.staging/tslint-748165ee/lib/rules/completed-docs/exclusionFactory.js'
npm WARN tar ENOENT: no such file or directory, open '/Projects/nativescript-mapbox/demo/node_modules/.staging/tslint-748165ee/lib/rules/completed-docs/tagExclusion.d.ts'
npm WARN tar ENOENT: no such file or directory, open '/Projects/nativescript-mapbox/demo/node_modules/.staging/tslint-748165ee/lib/rules/completed-docs/tagExclusion.js'
npm WARN demo No description
npm WARN demo No repository field.
npm WARN demo No license field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/karma/node_modules/fsevents):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/Projects/nativescript-mapbox/demo/node_modules/.staging/fsevents-28db378c/node_modules/abbrev' -> '/Projects/nativescript-mapbox/demo/node_modules/.staging/abbrev-ef9a697c'

npm ERR! path /Projects/nativescript-mapbox/demo/node_modules/.staging/nativescript-mapbox-ae82a382/node_modules/ansi-styles
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename '/Projects/nativescript-mapbox/demo/node_modules/.staging/nativescript-mapbox-ae82a382/node_modules/ansi-styles' -> '/Projects/nativescript-mapbox/demo/node_modules/.staging/ansi-styles-abdf1195'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent 
npm ERR! code ELIFECYCLE
npm ERR! errno 254
npm ERR! nativescript-mapbox@4.4.1 setupandinstall: `npm i && cd ../demo && npm i && cd ../src && npm run build && cd ../demo && tns plugin add ../src && cd ../src`
npm ERR! Exit status 254
npm ERR! 
npm ERR! Failed at the nativescript-mapbox@4.4.1 setupandinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Ubuntu 18.04.1 LTS Node v8.12.0

The nativescript-pluginshowcase demo app builds without issue but it seems to be using an older version of the plugin.

Yermo commented 5 years ago

It looks like these errors might be spurious. Trying various options from package.json I ran:

npm run development.setup
npm run preparedemo
npm run demo.android.build

and then

`` npm run demo.android


It generated quite a few errors in mapbox.ios.ts with missing identifiers such as:

node_modules/nativescript-mapbox/mapbox.ios.ts:1047:41 - error TS2304: Cannot find name 'NSOperationQueue'.

1047 eventName, null, utils.ios.getter(NSOperationQueue, NSOperationQueue.mainQueue), callback);



Many many pages thereof. 
EddyVerbruggen commented 5 years ago

Can you clone again and throw away package-lock.json files, then try again?

Yermo commented 5 years ago
git clone https://github.com/EddyVerbruggen/nativescript-mapbox.git

cd nativescript-mapbox

rm ./src/package-lock.json ./demo/package-lock.json ./publish/package-lock.json

cd ./src

npm run demo.android

addressed the npm errors. Thank you.

I am still getting quite a few "Cannot find name" errors in mapbox.ios.ts. I'm guessing this is because I'm building for Android?