question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

NativeScript 7 build error: "export 'Style' (reexported as 'StyleBase') was not found in './map-view'

See original GitHub issue

I have upgraded from NS6 to NS7.

When I run ns build android I get this warning:

WARNING in ../node_modules/nativescript-google-maps-sdk/map-view-common.js 72:0-30
"export 'Style' (reexported as 'StyleBase') was not found in './map-view'
 @ ../node_modules/nativescript-google-maps-sdk/map-view.js
 @ ./app/authenticated/home-page/components/geo-clocking-button/modals/google-maps-modal/google-maps-modal.component.ts
 @ ./app/authenticated/authenticated.module.ts
 @ ./app/main/app.module.ts
 @ ./main.ts

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:20

github_iconTop GitHub Comments

2reactions
Przemasecommented, Mar 4, 2022

Proper webpack.config.js

const webpack = require(“@nativescript/webpack”); const { resolve } = require(‘path’);

module.exports = (env) => { webpack.init(env);

// Learn how to customize:
// https://docs.nativescript.org/webpack

webpack.chainWebpack(config => {
	config.resolve.alias.set('./map-view', resolve(__dirname, 'node_modules/@nativescript/core'));
})

return webpack.resolveConfig();

};

1reaction
MattCCCcommented, Feb 23, 2022

As a solution to this problem you can simply add

    alias['./map-view'] = resolve(projectRoot, 'node_modules/@nativescript/core');

in your webpack.config.js file. As long as your project doesn’t have map-view file without any extension, you can sleep well. Hope it helps.

Read more comments on GitHub >

github_iconTop Results From Across the Web

how to solve nativescript-google-maps-sdk issue with NS 7 ...
I am using Nativescript 7 with angular 10. ERROR Error: Uncaught (in promise): TypeError: Class constructor View cannot be invoked without 'new' ...
Read more >
I have upgraded from NS6 to NS7.
NativeScript 7 build error : "export 'Style' (reexported as 'StyleBase') was not found in './map-view'
Read more >
Creating a Map-based App with Nativescript Vue
In this post, I'll discuss how to use maps, location services and API calls to create a Nativescript Vue application that will display...
Read more >
nativescript-google-maps-sdk-n7
Setup · Configure API Key for Android · Configure API Key for iOS · Adding the MapView · Properties · Events · Native...
Read more >
Using Google Maps in NativeScript
How to center the map · Place a marker on the map · Draw a polyline on the map · How to remove...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found