Forum Discussion
SyntaxError: export declarations may only appear at top level of a module
Hi all!
I'm newbie in custom visuals development so sorry for a stupid question may be.
I follow this instruction for creating a new custom visual.
I created the new project using the same way as instruction says. It works fine.
Well, I installed d3 library and added typings using command:
npm install @types/[email protected] --save-dev
My little project understands type d3 after that. But it does not work now.
I did a little research and saw the following message in browser console:
As I see the script crashes because export command appears at NOT top level of module.
I will be grateful for any help.
Thanks in advance,
Alexander.
What version of d3 did you install?
Power BI Visuals Tools support d3v3 only.
We'd recommend to install d3v3:
npm i [email protected] @types/[email protected]
Ignat Vilesov,
Software Engineer
Microsoft Power BI Custom Visuals
3 Replies
- v-viigCommunity Champion
What version of d3 did you install?
Power BI Visuals Tools support d3v3 only.
We'd recommend to install d3v3:
npm i [email protected] @types/[email protected]
Ignat Vilesov,
Software Engineer
Microsoft Power BI Custom Visuals
- v-viigCommunity Champion
Hi Alexander,
Thank you for the feedback.
We're working on improving our documentation.
Ignat Vilesov,
Software Engineer
Microsoft Power BI Custom Visuals