Open akarora11 opened 3 years ago
Hi Akarora11
Whenever you make changes to a library, you must rebuild that library.
Run ng build game-engine-lib --watch
to build and watch for changes on file save (as explained in the article).
See the scripts section of the package.json
file for all the scripts you can run.
Best,
Hello sir, Thanks for response. But I tried to rebuild the library but still it shows me this error. Although after running the command this is the output I get : `cross-platform-monorepo$ npm run build:game-engine-lib --watch
cross-platform-monorepo@0.0.0 build:game-engine-lib /data/cross-platform-monorepo ng build game-engine-lib --watch
Building Angular Package
It is not recommended to publish Ivy libraries to NPM repositories. Read more here: https://v9.angular.io/guide/ivy#maintaining-library-compatibility
Compiling TypeScript sources through ngc Bundling to FESM2015 Bundling to UMD Minifying UMD bundle Writing package metadata Built game-engine-lib
Built Angular Package
Compilation complete. Watching for file changes... ` After that I try to run the tetris application and it won't work
Could you please provide answers to the below questions:
What are the exact steps to reproduce this error?
Did you fork the cross-platform-monorepo
repo or did you start a fresh Angular project and followed the steps in the article?
After that I try to run the tetris application and it won't work
What command did you use to run the tetris application and what is the exact error message?
Ahh I got the error, I import the wrong GameEngineLib in tetris module.
but when I add the right one and run this command "npm run start:tetris"
ERROR in Cannot read property '0' of undefined.
And in browser it shows "Cannot GET /"
Is this is expected behavior?
Also I fork the cross-platform-monorepo and followed the steps mentioned in the article
Thanks Anuj
Hi Anuj
If you forked the project, then you only need to run the following commands (from the root of the project):
npm install
npm run build
npm run start
This will launch both the Electron and Web applications.
Please try it and let me know how it goes.
Cheers
Hello, When I am trying to run the application, It shows " ERROR in ./src/app/app.module.ts Module not found: Error: Can't resolve '@game-engine-lib' in '/data/cross-platform-monorepo/projects/tetris/src/app' " whereas this error occurs only while running the application and it doesn't show error while import. Can you please help me in this.
Thanks