-
Notifications
You must be signed in to change notification settings - Fork 12k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Primeng/Primeui webpack Module parse failed Unexpected character #1878
Comments
I filed this same issue against the primeng/primeui github project here |
The simplest way is to work around is replacing the gif with another. or just delete it and touch an empty file with the same name I guess it's the image file format problems |
Having a similar, but different problem with PrimeNG. My angular-cli.json file is:
running the latest AngularCLI: "1.0.0-beta.11-webpack.8" When trying to start the app with ng serve, I get:
|
@jtsom That looks like the same issue that was reported above. |
I'm not so sure... those commits seem to say that it's a problem with the actual gif file format.. not that it can't find the files at all, which is what the errors I see seem to indicate. Looking in the folders specified in the error messages, I do not see the gif image files it's looking for: C:\code\a2test\node_modules\primeng\resources\images\loading.gif (and rating.png - which also indicates that it isn't a gif specific problem) Looking around I do see images with the correct name in the 'primeui/resources/images' folder... so it looks like images referenced in the primeng css files are looking for files in the primeui package... |
@jtsom You are exactly correct. I was mistaken. Those files are not available in the primeng/resources/images folder. |
I found a workaround if one only needs primeng modules not using the gif images. In my case (using Growl) it works. |
The thing is, I'm not including @ctkdev so, is there a fix / workaround on the horizon? |
Which primeng modules are you using? |
Whichever was installed when I did a npm install primeng - "primeng": "^1.0.0-beta.14" (per the directions) |
That's just what you installed, but that doesn't mean you need/use all of them! Which modules do you import in your code and inject into your app module?
|
That's as far as I got when it started throwing the errors and nothing would display - I didn't even get to put any items on the actual template. |
Mine is similar: src/app/app.module.ts
angular-cli.json
package.json
I added a project that works as a baseline https://github.com/ctkdev/angular-cli-webpack-8 @FallenRiteMonk Thanks for the tip on importing the individual component CSS files in the angular-cli.json e.g. "../node_modules/primeng/components/button/button.css" |
@jtsom have a look at @ctkdev's example, especially at the angular-cli.json.
|
Yup, just read the comment and made that change. I don't get a build error anymore :) (I'm now getting a runtime exception: |
@jtsom Be sure to downgrade typescript to "typescript": "2.0.0" Check the package.json file to make sure that you have downgraded typescript and pinned it at 2.0.0 |
Yup. I do have that in my package.json, trying to do an npm install [email protected] to see if that helps... and nope... |
@jtsom I was right where you are right now. I followed the steps listed in this comment to get past the issue: I promise it is worth it once you get everything in place and working. The cli is great - when it works. ;-) |
Yeah, I just did that (I did it with another project and it fixed it), but it's not working for this one... I can't wait until everything is final and all the dependencies are up to date! |
@jtsom As a last resort - I normally do a: Then do a: |
Thanks... been there.. done that ;) No joy. |
The crazy thing is, I have another project, that's configured almost identically, that runs just fine. The package.json, app.module.ts, and angular-cli.json files are just about identical. I'm at a loss... |
add loader to support loading of gif images Closes #1878
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Error on adding primeng/primeui to a angular-cli webpack project
OS?
Linux 4.4.0-34-generic long update time 285707ms #53-Ubuntu SMP Wed Jul 27 16:06:39 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
Versions. Please run
ng --version
. If there's nothing outputted, please runin a Terminal:
node --version
and paste the result here:angular-cli: local (v1.0.0-beta.11-webpack.2, branch: master)
node: 6.4.0
os: linux x64
git log
on local angular-cli clone:latest master commit is:
commit 1f4c6fe
Author: Mike Brocchi [email protected]
Date: Mon Aug 29 00:05:32 2016 -0400
feat(feature): add ability to generate feature modules (feat(feature): add ability to generate feature modules #1867)
Repro steps. Was this an app that wasn't created using the CLI? What change did you
do on your code? etc.
added primeng to a project:
npm install --save primeng primeui
added
"../node_modules/primeui/themes/omega/theme.css", "../node_modules/font-awesome/css/font-awesome.min.css", "../node_modules/primeui/primeui-ng-all.min.css"
to apps[0].stylesng build
The log given by the failure. Normally this include a stack trace and some
more information.
Just ask if any more information is required!
The text was updated successfully, but these errors were encountered: