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

jest-diff error running "npm run webpack:prod" #149

Closed
ecirilo opened this issue Jun 26, 2020 · 1 comment · Fixed by #150
Closed

jest-diff error running "npm run webpack:prod" #149

ecirilo opened this issue Jun 26, 2020 · 1 comment · Fixed by #150
Labels
bug Something isn't working

Comments

@ecirilo
Copy link

ecirilo commented Jun 26, 2020

Describe the bug
Doing an npm run webpack:prod in server folder of a generated app shows the import errors:

ERROR in /Users/elder/Programming/oomenu/backoffice/server/node_modules/jest-diff/build/index.d.ts
[tsl] ERROR in /Users/elder/Programming/oomenu/backoffice/server/node_modules/jest-diff/build/index.d.ts(10,13)
TS1005: '=' expected.

ERROR in /Users/elder/Programming/oomenu/backoffice/server/node_modules/jest-diff/build/index.d.ts
[tsl] ERROR in /Users/elder/Programming/oomenu/backoffice/server/node_modules/jest-diff/build/index.d.ts(10,34)
TS1005: ';' expected.

ERROR in /Users/elder/Programming/oomenu/backoffice/server/node_modules/jest-diff/build/index.d.ts
[tsl] ERROR in /Users/elder/Programming/oomenu/backoffice/server/node_modules/jest-diff/build/index.d.ts(11,1)
TS1128: Declaration or statement expected.

ERROR in /Users/elder/Programming/oomenu/backoffice/server/node_modules/jest-diff/build/index.d.ts
[tsl] ERROR in /Users/elder/Programming/oomenu/backoffice/server/node_modules/jest-diff/build/index.d.ts(11,13)
TS1005: ';' expected.

ERROR in /Users/elder/Programming/oomenu/backoffice/server/node_modules/jest-diff/build/index.d.ts
[tsl] ERROR in /Users/elder/Programming/oomenu/backoffice/server/node_modules/jest-diff/build/index.d.ts(11,52)
TS1005: ';' expected.

ERROR in /Users/elder/Programming/oomenu/backoffice/server/node_modules/jest-diff/build/diffLines.d.ts
[tsl] ERROR in /Users/elder/Programming/oomenu/backoffice/server/node_modules/jest-diff/build/diffLines.d.ts(8,13)
TS1005: '=' expected.

ERROR in /Users/elder/Programming/oomenu/backoffice/server/node_modules/jest-diff/build/diffLines.d.ts
[tsl] ERROR in /Users/elder/Programming/oomenu/backoffice/server/node_modules/jest-diff/build/diffLines.d.ts(8,34)
TS1005: ';' expected.

ERROR in /Users/elder/Programming/oomenu/backoffice/server/node_modules/jest-diff/build/printDiffs.d.ts
[tsl] ERROR in /Users/elder/Programming/oomenu/backoffice/server/node_modules/jest-diff/build/printDiffs.d.ts(8,13)
TS1005: '=' expected.

ERROR in /Users/elder/Programming/oomenu/backoffice/server/node_modules/jest-diff/build/printDiffs.d.ts
[tsl] ERROR in /Users/elder/Programming/oomenu/backoffice/server/node_modules/jest-diff/build/printDiffs.d.ts(8,57)
TS1005: ';' expected.

To Reproduce
Steps to reproduce the behavior:

  1. Go to server folder
  2. Run npm run webpack:prod

Expected behavior
Have the production bundle built with webpack

Desktop (please complete the following information):

  • OS: macOs 10.15.4

Additional context
jhipster-nodejs v1.0.2

@ghost
Copy link

ghost commented Jun 26, 2020

Hi!! Thanks for the interest!
This is a new bug of jest: jestjs/jest#9714 (comment)
I have just fixed that with the following steps:

  • Update in your server package.json the jest and @types/jest to 25.2.3 version
  • Add in your webpack.server.prod.config.ts the following section:
  externals: {
        '@nestjs/microservices': 'nestjs/microservices',
        'cache-manager': 'cache-manager',
        'fastify-swagger': 'fastify-swagger',
	'aws-sdk': 'aws-sdk',
    },

These steps resolve that. I'm starting a branch on the generator.

@ghost ghost self-assigned this Jun 26, 2020
@ghost ghost added the bug Something isn't working label Jun 26, 2020
@ghost ghost linked a pull request Jun 26, 2020 that will close this issue
@ghost ghost closed this as completed in #150 Jun 29, 2020
ghost pushed a commit that referenced this issue Jun 29, 2020
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant