jhipster / generator-jhipster-nodejs

A NodeJS blueprint that creates the backend using NestJS
https://www.npmjs.com/package/generator-jhipster-nodejs
Apache License 2.0
258 stars 79 forks source link

npm run start:app not work after init an new app #109

Closed feitian124 closed 4 years ago

feitian124 commented 4 years ago

Describe the bug npm run start:app not work after init an new app

To Reproduce

  1. after install 1.0.0-beta.3
  2. then jhipster --blueprints nodejs
  3. create an monolith app, see yo-rc.txt
  4. npm install
  5. npm run start:app

Expected behavior app luanch and works.

Screenshots

WARNING in entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance.
Entrypoints:
  main (1.22 MiB)
      content/vendors.9b03719447ff29ef79d8.css
      app/vendors.9b03719447ff29ef79d8.chunk.js
      content/main.9b03719447ff29ef79d8.css
      app/main.9b03719447ff29ef79d8.bundle.js

ERROR in /home/ming/work/bbs/src/main/webapp/app/modules/login/login.tsx
ERROR in /home/ming/work/bbs/src/main/webapp/app/modules/login/login.tsx(26,11):
TS2339: Property 'from' does not exist on type '{} | { from: { pathname: string; search: string; }; }'.
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! bbs@0.0.1-SNAPSHOT webpack: `node --max_old_space_size=4096 node_modules/webpack/bin/webpack.js "--config" "webpack/webpack.prod.js" "--profile"`
npm ERR! Exit status 2

Desktop (please complete the following information):

there are 2 issue:

  1. warn: app/vendors.9b03719447ff29ef79d8.chunk.js (1.03 MiB) too large
  2. error: ERROR in /home/ming/work/bbs/src/main/webapp/app/modules/login/login.tsx(26,11): TS2339: Property 'from' does not exist on type '{} | { from: { pathname: string; search: string; }; }'.
feitian124 commented 4 years ago

well.. below works

Run the following commands in two separate terminals to create a blissful development experience where your browser
auto-refreshes when files change on your hard drive.

    cd server && npm start
    npm start
ghost commented 4 years ago

Hi @feitian124 , thanks a lot for your feedback! The issue is related to the react client build, so this is the reason that npm start command works (run only backend), while npm run start:app is broken (it builds the client, and after run the full client/server app). The issue is due to jhipster, not to blueprint. In fact, I opened an issue for that: https://github.com/jhipster/generator-jhipster/issues/11229.

However, in the next release I will update jhipster, so the error will be resolved.

feitian124 commented 4 years ago

@amanganiello90 thank you for your reply.

And nice work of nodejs backend for jhipster, i think this deserves more attention from nodejs community as they also need bluesprint. But jhipster is mostly for java developers so nodejs community may not know this well yet.

besides, if nodejs backend is used, then the backend and frontend are using the same language, some nodejs specific staff can used to make this better code structure, like lernajs

ghost commented 4 years ago

@amanganiello90 thank you for your reply.

And nice work of nodejs backend for jhipster, i think this deserves more attention from nodejs community as they also need bluesprint. But jhipster is mostly for java developers so nodejs community may not know this well yet.

besides, if nodejs backend is used, then the backend and frontend are using the same language, some nodejs specific staff can used to make this better code structure, like lernajs

Yes, I already post articles about the nodejs blueprint on LinkedIn, Twitter and dev sites.

feitian124 commented 4 years ago

:+1: keep safe from novel coronavirus and good luck.

ghost commented 4 years ago

HI @feitian124 , now there is the last release (1.0.0) with your request: I consider this issue closed, but for every problems feel you free to open new tickets. Thanks.

feitian124 commented 4 years ago

nice work, thanks