<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Sardor Madaminov</title>
    <description>The latest articles on DEV Community by Sardor Madaminov (@sardor-m).</description>
    <link>https://dev.to/sardor-m</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1186167%2Fdf82343c-2c57-4a07-84e0-b0f1b86645b4.png</url>
      <title>DEV Community: Sardor Madaminov</title>
      <link>https://dev.to/sardor-m</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sardor-m"/>
    <language>en</language>
    <item>
      <title>Optimer for your project security and performance issues</title>
      <dc:creator>Sardor Madaminov</dc:creator>
      <pubDate>Tue, 31 Dec 2024 06:26:04 +0000</pubDate>
      <link>https://dev.to/sardor-m/optimer-for-your-project-security-and-performance-issues-26h3</link>
      <guid>https://dev.to/sardor-m/optimer-for-your-project-security-and-performance-issues-26h3</guid>
      <description>&lt;p&gt;Recently i worked on project, which does the below things if you are developing a frontend project and want to optimize and analyze your security or performance pitfalls.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;CLI Argument Parsing,&lt;/li&gt;
&lt;li&gt;Build and Measure Performance,&lt;/li&gt;
&lt;li&gt;Analyze your project's health,&lt;/li&gt;
&lt;li&gt;Check for security vulnerabilities,&lt;/li&gt;
&lt;li&gt;Optimize build performance,&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Automatically detects your project type (Vite or Webpack) and provides insights about:&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Bundle sizes&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Build times&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Dependency health&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Security Checks&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you are interested in to contribute or collaborate on this project, you are welcome to do.&lt;/p&gt;

&lt;p&gt;And suggestions would be appreciated. Thank you.&lt;/p&gt;

&lt;p&gt;Project Npm package link:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.npmjs.com/package/securely" rel="noopener noreferrer"&gt;Project Npm package link&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/Sardor-M/Securely" rel="noopener noreferrer"&gt;Project Git Source&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>react</category>
      <category>npm</category>
    </item>
    <item>
      <title>Resolving AWS Amplify Build Failures: Keeping Your package.json and package-lock.json in Sync [Solved]</title>
      <dc:creator>Sardor Madaminov</dc:creator>
      <pubDate>Sat, 04 Nov 2023 14:05:42 +0000</pubDate>
      <link>https://dev.to/sardor-m/resolving-aws-amplify-build-failures-keeping-your-packagejson-and-package-lockjson-in-sync-solved-36f5</link>
      <guid>https://dev.to/sardor-m/resolving-aws-amplify-build-failures-keeping-your-packagejson-and-package-lockjson-in-sync-solved-36f5</guid>
      <description>&lt;p&gt;&lt;strong&gt;⚠️ Understanding the Problem:&lt;/strong&gt;&lt;br&gt;
When building web applications with AWS-Amplify (serverless backend), you may encounter issues during your deployment process. One of the common and of course most frustrating issue i came across recently was the package.json and package-lock.json synchronization error. Before diving into the solution, lets have a clear understanding of the issue first.&lt;/p&gt;

&lt;p&gt;Meme from &lt;a href="http://www.quickmeme.com/"&gt;http://www.quickmeme.com/&lt;/a&gt;&lt;br&gt;
When deploying your project to AWS Amplify, it is important to understand that AWS Amplify relies on your project’s package-lock.json file to make sure the correct dependencies are installed in. And if there’s a mismatch between your package.json and package-lock.json files, it is inevitable that you will encounter the following error during the process of Frontend build phase:&lt;/p&gt;

&lt;p&gt;Entire log of this error can be found on this github issue log link&lt;/p&gt;

&lt;p&gt;As you notice this error sometimes can be frustrating to deal with, as because personally, it took me 6 hours to fix the issue. However, there is an effective solution to get around this problem.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;⚙️ Solutions&lt;/strong&gt;&lt;br&gt;
Lets first discuss the most viable solution that usually will solve this issue in AWS Amplify deployment process.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Solution 1:&lt;/strong&gt;&lt;br&gt;
First approach is to ensure your local development environment has synchronized package.json and package-lock.json files. This is done by following these steps:&lt;/p&gt;

&lt;p&gt;Delete your package-lock.json file and the node_modules folder&lt;br&gt;
Re-generate the package-lock.json file by running the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;While this solution works for many, it may not be sufficient for your AWS Amplify environment. And it was true for my case, it did not get the issue resolved. So if you are still facing the issue after trying above method, don’t worry, the second alternative approach will get the job done.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Solution 2:&lt;/strong&gt;&lt;br&gt;
If syncing the files locally does not resolve this issue, try updating your AWS Amplify build scripts setting. Here is how you can do it:&lt;/p&gt;

&lt;p&gt;Navigate to your Aws Amplify Console and open your amplify.yml file [Aws Amplify Console -&amp;gt; App Settings -&amp;gt; Build Settings].&lt;br&gt;
Modify your preBuild setting in the build specification of your app to include the following commands:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;version: 1
frontend:
  phases:
    preBuild:
      commands:
        - npm install --package-lock-only
        - npm ci
    build:
      commands:
        - npm run build
  artifacts:
    baseDirectory: build
    files:
      - '**/*'
  cache:
    paths:
      - node_modules/**/* 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As you may notice usually only the difference made is the inclusion of the &lt;code&gt;npm install --package-lock-only&lt;/code&gt; command, which ensures that your Aws Amplify environment uses the synchronized files. This setting configuration will help you to avoid the synchronization issue during deployment.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;⛓ Outro:&lt;/strong&gt;&lt;br&gt;
Sychcronizing your package.json and package-lock.json files is important to the success of your Aws Amplify deployments. Because if you are facing such issue for the first time, it can be your frustration of hours of searching and learning the issue in depth.&lt;/p&gt;

&lt;p&gt;Using the above methods you will save your time and energy to solve this obstacle and keep your Amplify project running smoothly. With a right troubleshooting and right adjustments in the config file, you can resolve the sync issue.&lt;/p&gt;

&lt;p&gt;Gif from &lt;a href="https://tenor.com/"&gt;https://tenor.com/&lt;/a&gt;&lt;br&gt;
Remember that key is not to give up when solving such common issues.&lt;/p&gt;

&lt;p&gt;Now, you are well-equipped to work around with this challenge. Enjoy your hassle-free Aws Amplify project building experience.&lt;/p&gt;

&lt;p&gt;Happy Coding :)&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>aws</category>
      <category>nextjs</category>
      <category>react</category>
    </item>
  </channel>
</rss>
