Skip to content
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

Production gradle build doesn't work after upgrade to 4.6.0/1 #6078

Closed
jkili opened this issue Jul 11, 2017 · 3 comments
Closed

Production gradle build doesn't work after upgrade to 4.6.0/1 #6078

jkili opened this issue Jul 11, 2017 · 3 comments
Milestone

Comments

@jkili
Copy link

jkili commented Jul 11, 2017

Overview of the issue

I have upgraded from 4.5.1 to 4.6.0 (and now this afternoon up to 4.6.1) and everything works perfectly, except the new webpack.prod.js (yarn webpack:prod or via gradle gradlew -Pprod bootRepackage -x test) which runs and never completes. It does get an error which I have shown below but it doesn't stop the process from continuing to run:

yarn webpack:prod v0.23.2
$ yarn run cleanup && yarn run webpack:prod:main 
yarn run v0.23.2
$ rimraf build/{aot,www} 
✨  Done in 0.20s.
yarn run v0.23.2
$ yarn run webpack -- --config webpack/webpack.prod.js --progress --profile 
yarn run v0.23.2
$ node --max_old_space_size=4096 node_modules/webpack/bin/webpack.js --config webpack/webpack.prod.js --progress --profile
Starting compilation using the angular compiler.
Angular compilation done, starting webpack bundling.
Error: Child compilation failed:
Module build failed: 
@import "../../core/styles/themes/_themes.scss";
^
      Invalid CSS after "...load the styles": expected 1 selector or at-rule, was "var content = requi"
      in /Users/james/git/doxp.web/node_modules/ngx-chips/dist/modules/components/tag-input/tag-input.style.scss (line 1, column 1):
Error: 
@import "../../core/styles/themes/_themes.scss";
^
      Invalid CSS after "...load the styles": expected 1 selector or at-rule, was "var content = requi"
Motivation for or Use Case

No longer can perform production builds. I want to keep using the jhipster webpack/gradle configurations un-modified and this has worked up till this release.

Reproduce the error

As above. I have included "ngx-chips": "1.4.5" in package.json. This plugin works correctly after dev builds/yarn start.

Related issues

No

Suggest a Fix

N/A

JHipster Version(s)

4.6.0 and 4.6.1 both have the issues

JHipster configuration
JHipster Version(s)
[email protected] /Users/james/git/doxp.web
├── [email protected] 
└── UNMET PEER DEPENDENCY [email protected]

JHipster configuration, a .yo-rc.json file generated in the root folder
.yo-rc.json file
{
  "generator-jhipster": {
    "promptValues": {
      "packageName": "io.doxp"
    },
    "jhipsterVersion": "4.6.1",
    "baseName": "doxp",
    "packageName": "io.doxp",
    "packageFolder": "io/doxp",
    "serverPort": "8080",
    "authenticationType": "jwt",
    "hibernateCache": "no",
    "clusteredHttpSession": false,
    "websocket": false,
    "databaseType": "mongodb",
    "devDatabaseType": "mongodb",
    "prodDatabaseType": "mongodb",
    "searchEngine": false,
    "messageBroker": false,
    "serviceDiscoveryType": false,
    "buildTool": "gradle",
    "enableSocialSignIn": true,
    "jwtSecretKey": "replaced-by-jhipster-info",
    "clientFramework": "angularX",
    "useSass": true,
    "clientPackageManager": "yarn",
    "applicationType": "monolith",
    "testFrameworks": [
      "gatling",
      "protractor"
    ],
    "jhiPrefix": "jhi",
    "enableTranslation": false,
    "herokuAppName": "DoxP"
  }
}
JDL for the Entity configuration(s) entityName.json files generated in the .jhipster directory
JDL entity definitions

##### **Environment and Tools** java version "1.8.0_102" Java(TM) SE Runtime Environment (build 1.8.0_102-b14) Java HotSpot(TM) 64-Bit Server VM (build 25.102-b14, mixed mode) git version 2.12.2 node: v7.9.0 npm: 4.2.0 bower: 1.8.0 gulp: [17:46:08] CLI version 1.2.2 yeoman: 1.8.5 yarn: 0.23.2 Execution complete
Browsers and Operating System

Mac OS High Sierra

  • [ X] Checking this box is mandatory (this is just to show you read everything)
@deepu105
Copy link
Member

Seems like you have an issue from modification you have done so I suggest you take this to stack overflow. I suggest you also provide more details about what you have done if you expect help

This is not a bug or feature request and hence this is not the correct forum for this.
Please use Stack overflow for this. Tag the question with jhipster and someone will help you out there.

This helps us to keep issue tracker clean. Also stack overflow will give your query a larger audience.

@jdubois
Copy link
Member

jdubois commented Jul 11, 2017

I'm sorry but I can't reproduce:

  • I used your .yo-rc.json and ran ./gradlew -Pprod bootRepackage. Everything works.
  • I don't totally understand what you write about ngx-chips: I guess this is a library you added - are you sure this isn't causing the issue? Could you try removing it?

I'm closing this as I can't reproduce, of course please re-open if you have more information to help me.

@jkili
Copy link
Author

jkili commented Jul 11, 2017

Ok, no worries. This is the first upgrade which hasn't worked for me so thought there might be an issue, but happy for you to close.

-Update-
@deepu105 You were right. An update to webpack.common made ages ago keeps on being merged in that was causing the issue. Back to vanilla webpack config and it works perfectly.

Appreciate the work you both do. Thank you.

@jdubois jdubois modified the milestone: 4.6.2 Jul 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants