lemzo63
February 15, 2022, 1:02pm
1
Hello everybody I need your help please I am new in blockchain developpemlent.
here is my probleme:
when I run the following commant:
./bin/run start
I get the follwing error:
reference errotr : app is not defined
please can some one help me?
thank you
przemer
February 15, 2022, 1:21pm
2
Hello @lemzo63 please go to yours app src/app/modules.ts
and remove the _
from _app
import { Application } from 'lisk-sdk';
import { HelloModule } from "./modules/hello/hello_module";
export const registerModules = (_app: Application): void => {
app.registerModule(HelloModule);
};
Regards.
lemzo63
February 15, 2022, 1:32pm
3
Thank you dear for your answer.
here is my src/app/modules/modules.ts
/* eslint-disable @typescript-eslint /no-empty-function */
import { Application } from ‘lisk-sdk’;
import { HelloModule } from “./modules/hello/hello_module”;
// @ts-expect-error Unused variable error happens here until at least one module is registered
export const registerModules = (_app: Application): void => {
app.registerModule(HelloModule);
};
please tell me what I should remove
thank you
lemzo63
February 15, 2022, 1:36pm
5
OK I see I am doing it right now and will give you the result.once again thank you
lemzo63
February 15, 2022, 1:42pm
6
here is the result:
lemzo@lemzo-ThinkPad-SL510:
~/lbc$ lbc genesis-block:create --output config/default
output
ReferenceError: app is not defined
przemer
February 15, 2022, 1:46pm
7
does ./bin/run genesis-block:create --output config/default
work?
lemzo63
February 15, 2022, 2:01pm
8
no unfortunately it doesn’t work
przemer
February 15, 2022, 2:05pm
9
It should work, are you sure you’ve changed the the _app
to app
? in the modules.ts
file?
Mona
February 15, 2022, 2:07pm
10
Did you make the same changes in plugins.ts
, app
instead of _app
?
1 Like
lemzo63
February 15, 2022, 2:36pm
11
I make the same changes in plugins.ts
, app
instead of _app
and it works
It works !!!
Thank you for helping me.
god blees you
1 Like
lemzo63
February 15, 2022, 2:41pm
12
No I didn’t I am going to do it right now…
and gess what?
It works !!!
Thank you for helping me.
god blees you
1 Like