Git Product home page Git Product logo

Comments (6)

mraible avatar mraible commented on June 8, 2024

I'll update this issue after upgrading to 8.2.1 or close it if it's no longer valid.

from generator-jhipster.

mshima avatar mshima commented on June 8, 2024

This is a jhipster-migrate issue.

from generator-jhipster.

mraible avatar mraible commented on June 8, 2024

I finished a first pass at upgrading to JHipster 8.2.1 today. First, I upgraded to 7.9.4 and everything works. Then, I upgraded to 8.2.1.

The v8 upgrade is still in progress. First, there's an error when running npm test. This seems to be caused by ng2-charts, but I'm not sure how to fix.

FAIL src/main/webapp/app/home/home.component.spec.ts
  ● Test suite failed to run

    Jest encountered an unexpected token

    Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax.

    Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration.

    By default "node_modules" folder is ignored by transformers.

    Here's what you can do:
     • If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/ecmascript-modules for how to enable it.
     • If you are trying to use TypeScript, see https://jestjs.io/docs/getting-started#using-typescript
     • To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config.
     • If you need a custom transformation specify a "transform" option in your config.
     • If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option.

    You'll find more details and examples of these config options in the docs:
    https://jestjs.io/docs/configuration
    For information about custom transformations, see:
    https://jestjs.io/docs/code-transformation

    Details:

    /Users/mraible/dev/21-points/node_modules/lodash-es/lodash.js:10
    export { default as add } from './add.js';
    ^^^^^^

    SyntaxError: Unexpected token 'export'

      16 | import { IWeight, IWeightByPeriod } from '../entities/weight/weight.model';
      17 |
    > 18 | import { BaseChartDirective } from 'ng2-charts';
         | ^
      19 | import { ChartConfiguration, ChartOptions } from 'chart.js';
      20 | import dayjs from 'dayjs/esm';
      21 |

      at Runtime.createScriptFromCode (node_modules/jest-runtime/build/index.js:1505:14)
      at Object.<anonymous> (node_modules/ng2-charts/fesm2022/ng2-charts.mjs:4:23)
      at Object.require (src/main/webapp/app/home/home.component.ts:18:1)
      at Object.<anonymous> (src/main/webapp/app/home/home.component.spec.ts:11:1)

Other issues:

  1. On startup, the browser hangs. In Chrome, it isn't easy to open developer tools because it consumes so much memory. Once it's open, you can see a continuous loop of navigation errors.
  2. I'm not certain the search security logic is correct (filtering by user.login when not admin). I'm not able to test it because of the first issue.

from generator-jhipster.

mraible avatar mraible commented on June 8, 2024

I was able to fix the home.component.spec.ts by adding lodash-es to transformIgnorePatterns in jest.conf.js. mraible/21-points@ef3dc78

from generator-jhipster.

mraible avatar mraible commented on June 8, 2024

Safari allows me to see what the error is in its JavaScript console.

Screenshot 2024-04-04 at 4 06 28 PM

from generator-jhipster.

mraible avatar mraible commented on June 8, 2024

Closing this issue as it doesn't seem to be a problem with 8.2.1. I'll continue fixes in mraible/21-points#249.

from generator-jhipster.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.