typescript fails to start with "Error: Debug Failure. False expression."
JunjiUmeno opened this issue · 10 comments
I followed the insturctionon and I have failed at 'npm start' with the error, "Error: Debug Failure. False expression."
This seems a transpile code fails to transform typescript into js.
Log:
ERROR in ./app/random/random.riot
Module build failed (from ./node_modules/@riotjs/webpack-loader/dist/riot-webpack-loader.cjs.js):
Error: Debug Failure. False expression.
at processImportedModules (/home/um/WebstormProjects/examples/typescript/node_modules/typescript/lib/typescript.js:90834:26)
at findSourceFile (/home/um/WebstormProjects/examples/typescript/node_modules/typescript/lib/typescript.js:90634:17)
at /home/um/WebstormProjects/examples/typescript/node_modules/typescript/lib/typescript.js:90480:85
at getSourceFileFromReferenceWorker (/home/um/WebstormProjects/examples/typescript/node_modules/typescript/lib/typescript.js:90447:34)
at processSourceFile (/home/um/WebstormProjects/examples/typescript/node_modules/typescript/lib/typescript.js:90480:13)
at processRootFile (/home/um/WebstormProjects/examples/typescript/node_modules/typescript/lib/typescript.js:90310:13)
at /home/um/WebstormProjects/examples/typescript/node_modules/typescript/lib/typescript.js:89326:60
at Object.forEach (/home/um/WebstormProjects/examples/typescript/node_modules/typescript/lib/typescript.js:280:30)
at Object.createProgram (/home/um/WebstormProjects/examples/typescript/node_modules/typescript/lib/typescript.js:89326:16)
at check (/home/um/WebstormProjects/examples/typescript/riot-typescript-transformer.js:115:22)
@ ./app/main.ts 3:0-41 5:10-16
ℹ 「wdm」: Failed to compile.
I have just updated the npm dependencies and I can not reproduce the issue. Can you try again please?
Many thanks. I gonna try it later.
After checking out your commit and npm-install done , I got the same error.
A problem occurred at the function 'createProgram' in typescript/riot-typescript-transformer.js.
What on earth this function 'check' is for?
@JunjiUmeno are you on Windows? In that case I will need to check what could be the problem.
The riot-typescript-transformer is a type checker for *.riot
files, typescript doesn't check types in files different than .ts, .tsx
@JunjiUmeno are you on Windows? In that case I will need to check what could be the problem.
The riot-typescript-transformer is a type checker for*.riot
files, typescript doesn't check types in files different than.ts, .tsx
I'm on Linux(debian). I'm a newbie on riot and typescript, and this might be not any appropriate comment. Is that error for any riot scripts? If so, I suppose it's 'random.riot', which is only a riot script in this project , and I don't know which part of the script is wrong. Those error messages look warning about typescript rules.
I am not to reproduce the issue (I work on a mac so the Unix shell should make no difference). I will leave this issue open hoping someone could shine a bit of light on it
I am also on Windows and have been digging into this issue. Via commenting out sections of code I eventually realized that the issue is this line: import Logs from '../logs/logs.riot'
.
There is no "../logs/logs.riot" in the project tree. This is probably due to the following in the gitignore:
# Logs
logs
*.log
@lxndrdagreat well that's actually the problem 😄 I will fix it asap thank you
I also found on my workspace an import statement in the random.riot file.
app/random/random.riot:15: import Logs from '../logs/logs.riot'
It seems to expect logs.riot, but we don't have it.
Fixed guys. Thank you for your help