dojo / cli-build-app

Command for building Dojo applications
Other
9 stars 32 forks source link

Fresh Generated Sample Program get errors on compile, cannot proceed development #475

Closed richso closed 2 years ago

richso commented 2 years ago

Bug

running the below command line for trial view of the freshly generated sample project got a lot of following errors

command line: dojo build --mode dev --watch --serve

msg / errors on the console (listed some similar errors in various line of @types/babel-types): ℹ cli-build-app: 8.0.0 ℹ typescript: 3.5.3 ✔ hash: 014fccf5fcda607f5565 ✖ errors: 681 ⚠ warnings: 0

(undefined) /Users/brotherseven/NetBeansProjects/dojo7-test/dojo7-test/node_modules/@types/babel-types/index.d.ts [tsl] ERROR in /Users/brotherseven/NetBeansProjects/dojo7-test/dojo7-test/node_modules/@types/babel-types/index.d.ts(176 9,96) TS1144: '{' or ';' expected. (undefined) /Users/brotherseven/NetBeansProjects/dojo7-test/dojo7-test/node_modules/@types/babel-types/index.d.ts [tsl] ERROR in /Users/brotherseven/NetBeansProjects/dojo7-test/dojo7-test/node_modules/@types/babel-types/index.d.ts(176 9,101) TS1005: ';' expected. (undefined) /Users/brotherseven/NetBeansProjects/dojo7-test/dojo7-test/node_modules/@types/babel-types/index.d.ts [tsl] ERROR in /Users/brotherseven/NetBeansProjects/dojo7-test/dojo7-test/node_modules/@types/babel-types/index.d.ts(176 9,104) ... The build completed with errors. Listening on port 9999 Please note the serve option is not intended to be used to serve applications in production.

Same For dojo7: ℹ cli-build-app: 7.0.5 ℹ typescript: 3.4.5 ✔ hash: 227fa3e70c5aa3b7fe66 ✖ errors: 681 ⚠ warnings: 0 ...

Package Version: cli-build-app: 8.0.0 typescript: 3.5.3 OR cli-build-app: 7.0.5 typescript: 3.4.5

Example (command lines, default generated project):

dojo create app --name dojo7-test cd dojo7-test dojo build --mode dev --watch --serve

Expected behavior: There should be no compilation errors

Actual behavior: The dev web server started at port 9999 for dojo8 (but terminated for dojo7) and the web page displayed normally upfront, however on modifying some of the display text on the e.g., Home.ts file to trigger re-compilation, errors like the above appeared on the web page.

Supplementary info: MacOS 12.2 npm version 6.14.10

matt-gadd commented 2 years ago

@richso sorry for the delayed reply on this and thanks for reporting 👍 . looks like unfortunately babel-types (which comes from another dependency) has types that are not backwards incompatible with older versions of typescript. we'll look at how we can pin those to fix @dojo/cli-build-app

richso commented 2 years ago

Unfortunately, the same problem still happened when I tried on a Mac (MacOS Monterey 12.3) and Linux (AWS 2 VM):

I am very disappointed and I am about to abandon to use dojo for future projects, sorry.

agubler commented 2 years ago

Will take another look today, and also make 8.0.1 latest an oversight on our side.