SAP-samples/ui5-typescript-tutorial

ERROR: "watch:ts" exited with 1.

karpovas1505 opened this issue · 5 comments

Hi @akudev .
Thanks for the tutorial but when I try to run generated project I am getting an error:

Syntax error in file name, folder or ...
ERROR: "watch:ts" exited with 1.
Screenshot attached.
Снимок

Maybe problem in updated packages version ?
"devDependencies": { "@babel/cli": "^7.16.0", "@babel/core": "^7.16.0", "@babel/preset-env": "^7.16.4", "@babel/preset-typescript": "^7.16.0", "@openui5/ts-types-esm": "1.103.0", "@types/jquery": "3.5.1", "@typescript-eslint/eslint-plugin": "^5.6.0", "@typescript-eslint/parser": "^5.6.0", "@ui5/cli": "^2.14.1", "babel-preset-transform-ui5": "^7.0.5", "eslint": "^8.4.1", "npm-run-all": "^4.1.5", "typescript": "^4.5.3", "ui5-middleware-livereload": "^0.5.8" },

@karpovas1505 Well, incidentally I just followed the entire tutorial on my own from scratch, as preparation for our UI5con workshop, and I did not face any such issue. I have the exact same dependency versions.

At which step does the error occur? Right in the beginning after the creation from the template (after exercise 1)? Or later, after you already did changes in the application code?

If it happened right after exercise 1 maybe something suspicious pops up when you show us the .yo-rc.json file (containing the data entered in the generator).
Which node version are you using? (14 over here)
And which easyUI5 version? (npm info generator-easy-ui5 version)

Hi @akudev
It happened right after generation project structure and when I try start application(npm start)
I don't know whats wrong.

.yo-rc.json - content below
{
"generator-ui5-ts-app": {
"application": "myapp",
"namespace": "com.myorg",
"framework": "OpenUI5",
"frameworkVersion": "1.103.0",
"author": "as.karpov1",
"tstypes": "@openui5/ts-types-esm",
"tstypesVersion": "1.103.0",
"appId": "com.myorg.myapp",
"appURI": "com/myorg/myapp",
"setupCompleted": true
}
}

$ node -v
v16.14.0

$ npm info generator-easy-ui5 version
3.4.0
Maybe I need an older version of the generator?

Hi @karpovas1505
The error message (in English: "Syntax error in file name, folder name, or volume label") does not come from TypeScript or NodeJS, but from the Windows operating system. At least judged by other appearances in the web.

Now what's different on your Windows machine, compared to mine? Two things come to mind: first, you are using MinGW, and second, you are using Cyrillic characters.
The latter wouldn't be suspicious as long as they are not used in path names, but it's notable that several other people who hit the same problem (e.g. here, here, here, here and here) also use Cyrillic characters! That's all the first hits on Google I opened! I doubt this is pure incidence.

But I'm not sure how to proceed from here, as it's not clear what the file/folder name in question is or how to find out. Either it's "something about Cyrillic" or some erroneous path handling die to the Unix-style /C/... paths from MinGW.

Hello @akudev
I found the problem. The problem in npm version. In 8.13 0 version error appears. And in version 8.14.0 all works fine. Thanks Andreas.

Resolved by update npm version from 8.13.0 to 8.14.0