4

I trying to start my custom visual (like usually) but after I updated powerbi-custom-visual to version beta 3.0.11 from version 3.0.10 I got the following error:

error  ENOENT: no such file or directory, open '/Users/mar/CustomVisuals/rangechart/.tmp/precompile/visualPlugin.ts'
(node:1454) UnhandledPromiseRejectionWarning: Error: Failed to generate visualPlugin.ts
   at generateVisualPlugin.then.catch.ex (/usr/local/lib/node_modules/powerbi-visuals-tools/node_modules/powerbi-visuals-webpack-plugin/index.js:168:12)
   at <anonymous>

Does anyone knows why is that? I returned back to the previous beta version of powerbi-custom-visual but it did not help. With version 2.3.0 everything works fine.

Marek
  • 678
  • 3
  • 13
  • Hello, do you use new approach to visual development or just try to compile old visual project created by stable version of tools? – Ilfat Galiev Feb 22 '19 at 09:09
  • @Ilfat Galiev. New approach. I started to use v. 3.0.9. without problems. Later I updated to v. 3.0.10, also successfully. Problem started after update to 3.0.11. Problem did not disappeared when I moved back to 3.10. In fact I have the same error when I want to start purely new visual created with "pbiviz new newvisual" – Marek Feb 22 '19 at 14:58
  • 1
    3.0.12 version of tools was released. Could you check your case? Does the problem get away? – Ilfat Galiev Mar 06 '19 at 08:54
  • 1
    @IlfatGaliev Yes, it does. With 3.0.12 everything works fine. – Marek Mar 07 '19 at 20:21
  • @IlfatGaliev i upgraded from 3.0.10 to 3.0.12 and got this error. ```ERROR in ./.tmp/precompile/visualPlugin.ts 5:4 Module parse failed: Identifier 'NPSTableVisual' has already been declared (5:4) You may need an appropriate loader to handle this file type. | var powerbi = window[powerbiKey]; | > var NPSTableVisual-e13987b0-3aaa-4ff8-a49e-3b75d655ef77_DEBUG = { | name: 'NPSTableVisual-e13987b0-3aaa-4ff8-a49e-3b75d655ef77_DEBUG', | displayName: 'NPS Table', @ multi ./.tmp/precompile/visualPlugin.ts visual.js[0]``` – Dangling_pointer Apr 03 '19 at 08:56
  • @IlfatGaliev even after going back to 3.0.10 it's not working – Dangling_pointer Apr 03 '19 at 08:57
  • @IlfatGaliev server is not started in localhost:8080 – Dangling_pointer Apr 03 '19 at 10:45
  • @Dangling_pointer It' seems you used wrong name for visual class and GUID. Could you share pbiviz.json file? – Ilfat Galiev Apr 19 '19 at 12:25
  • @IlfatGaliev Got the issue, it was because my guid has `-` in it. Didn't know guid is being used as a variable name, figured it out after looking inside `.tmp`. – Dangling_pointer Apr 19 '19 at 12:37

1 Answers1

0

I ran into something similar after I deleted the .tmp folder in my project to clean up from an old build. I found that I had to manually (re)create the .tmp/precompile directories inside my project folder. Not sure why the tool couldn't handle creating them itself.

Trygve
  • 591
  • 1
  • 7
  • 22