Hello,
I am getting this error when I try to start local server
ERROR in ./node_modules/primeng/components/chart/chart.js Module not found: Error: Can't resolve 'chart.js' in '****\angular\node_modules\primeng\components\chart'
However, I don't have chart.js file defined in the angular.json file. Can you help me? Thank you!
9 Answer(s)
-
1
Maybe it's about this https://github.com/primefaces/primeng/issues/7769, can you look at it?
-
0
I saw this but the problem is I never used chart.js or anything about chart. I created an entity with Power Tools and then I rebuilt the solution. I switched to Visual Studio Code and ran npm start. I am getting this error weirdly.
-
0
Can you share your Angular project source code to: [email protected] ?
-
0
Email sent! Thank you!
-
0
I was having the same issue. I solved it by changing all my primeng imports according to this comment from the github thread maliming shared:
https://github.com/primefaces/primeng/issues/7769#issuecomment-501220976
-
0
Hey rpollak,
Oh, that's not good. There are a lot of imports. How could you change them? One by one?
Thank you!
-
0
Can't say I know a quick way. I just searched my project for 'primeng/primeng' and deleted the lines with those imports. Then I right-clicked all the new red squiggly underlined stuff and carefully selected the appropriate non-'primeng/prime/ng' import paths. Everything compiled for me after making that change.
-
0
This problem occurs when using the AspNetZero Power Tools....the main-module.ts is updated with statements like:
import { AutoCompleteModule } from 'primeng/primeng'; import { PaginatorModule } from 'primeng/primeng'; import { EditorModule } from 'primeng/primeng'; import { InputMaskModule } from 'primeng/primeng';import { FileUploadModule } from 'primeng/primeng'; import { TableModule } from 'primeng/table';
This is goes against earlier advice of being more specific regarding the imports (as is done for TableModule). I don't see these in the file templates section, so they must be introduced programmatically. Should this issue be reported as a Power Tools issue? Or are there other circumstances this is introduced?
-
0
hi triplabor I think rpollak and michael.pear point out the problem ,The latest version of zero does not have this problem.
You can try the above solution.