litefy
litefy copied to clipboard
I am facing a issue when i try to run the application. Kindly help me to resolve
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
then i try to run ng serve i got the below error
Can you provide more info about your dev environment?
- Node version
- Angular CLI Version
- Your machine's OS
@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
@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 thepackage-lock.json
, and runningyarn
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
@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:
-
use the command
npm install --force
Then got the following errorWhich is basically related to the proxy server, but that was not actually about the proxy server, it occurred due to a cache problem.
-
I use the command
npm cache clean --force
to clean the cache -
use the command,
npm install --force
, it successfully installed dependencies -
then, it installed angular by command
npm install -g @angular/cli --force
-
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.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