litefy icon indicating copy to clipboard operation
litefy copied to clipboard

I am facing a issue when i try to run the application. Kindly help me to resolve

Open inspiremithun opened this issue 1 year ago • 4 comments

Hi thanks in advance.I followed the steps which was given in the "Running the Application" section https://github.com/inspiremithun/litefy#running-the-application-

After giving npm install command i got the error as like below

image

then i try to run ng serve i got the below error image

inspiremithun avatar May 07 '23 15:05 inspiremithun

Can you provide more info about your dev environment?

  • Node version
  • Angular CLI Version
  • Your machine's OS

mathkruger avatar May 18 '23 10:05 mathkruger

@mathkruger Thanks for your Reply.

Please find the details of my Dev Env Node Version: 18.6.0 Angular CLI Version : 16.0.0 Machine's OS : Windows 10

image

inspiremithun avatar May 21 '23 03:05 inspiremithun

@inspiremithun @mathkruger I've just forked the repo and tried installing the dependencies to run into the same result. It looks like:

  • This repo needs an .nvmrc file to state the node version used and to avoid conflicting node version issues.
  • There's a yarn.lock file in addition to the package-lock.json, and running yarn installs dependencies without errors.

I personally think that using two package managers in a project is an antipattern and may cause additional dependency issues, though I'm certainly not an expert. The README instructions should be updated to include yarn as well, in any case.

My environment:

  • 6.3.8-arch1-1 (Arch Linux)
  • node v18.12.1
  • npm v8.19.2
  • yarn v1.22.19

aidasbui avatar Jun 19 '23 11:06 aidasbui

@inspiremithun I have just taken a look at your issue and that issue probably occur due to a version mismatch between your current dependencies versions installed on your machine and the versions listed on package.json or package-lock.json.

So, I forked your repo and cloned on my machine and after running the command npm install, I got the same error that you got.

To fix that issue, I apply the following steps:

  1. use the command npm install --force Then got the following error image Which is basically related to the proxy server, but that was not actually about the proxy server, it occurred due to a cache problem.

  2. I use the command npm cache clean --force to clean the cache

  3. use the command, npm install --force, it successfully installed dependencies

  4. then, it installed angular by command npm install -g @angular/cli --force

  5. run command, ng server, it successfully started the server and during compilation, I got the following error which is related to a Node.js version mismatch. image So, try to use the same version of Nodejs which is compatible with functions used in the code, or try to use other solutions.

I hope the above steps might be helpful.

My Environment:

  • Node Version: v18.16.0
  • npm version: 9.6.2
  • Angular CLI Version: 10.2.4
  • OS: Windows 10

image

zeeshanchana95 avatar Jun 26 '23 06:06 zeeshanchana95