<?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: Hafiz Saifullah</title>
    <description>The latest articles on DEV Community by Hafiz Saifullah (@hafizsaifullah).</description>
    <link>https://dev.to/hafizsaifullah</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%2F434301%2F46aeb1ca-e963-4b8a-b1c3-1c657ee3a0ec.png</url>
      <title>DEV Community: Hafiz Saifullah</title>
      <link>https://dev.to/hafizsaifullah</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/hafizsaifullah"/>
    <language>en</language>
    <item>
      <title>How to use npm "concurrently" module in package.json file</title>
      <dc:creator>Hafiz Saifullah</dc:creator>
      <pubDate>Thu, 23 Jul 2020 15:30:28 +0000</pubDate>
      <link>https://dev.to/hafizsaifullah/how-to-use-npm-concurrently-module-in-package-json-file-1lmc</link>
      <guid>https://dev.to/hafizsaifullah/how-to-use-npm-concurrently-module-in-package-json-file-1lmc</guid>
      <description>&lt;p&gt;Hey I am following an online course for blockchain based cryptocurrency network. Repository for course is &lt;a href="https://github.com/15Dkatz/cryptochain" rel="noopener noreferrer"&gt;https://github.com/15Dkatz/cryptochain&lt;/a&gt;. in package.json file, dev script is as follow...&lt;br&gt;
&lt;code&gt;"dev": "npm run dev-client &amp;amp; npm run start-redis &amp;amp;&amp;amp; cross-env ENV='development' nodemon index.js"&lt;/code&gt;, which is to start both front-end (react) and back-end (epress) servers, by using &lt;code&gt;npm run dev&lt;/code&gt; command in terminal. but for me it is running only front-end that is &lt;code&gt;npm run dev-client&lt;/code&gt;, which means only first part of dev is running. To run both commands concurrently, I installed &lt;code&gt;npm i concurrently&lt;/code&gt; module. But I am confusing about syntax of &lt;code&gt;dev&lt;/code&gt; with &lt;code&gt;concurrently&lt;/code&gt;. Suggest me what syntax should be used for above dev script along with concurrently. especially how &lt;code&gt;cross-env ENV='development'&lt;/code&gt; can be concatenated???&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>node</category>
      <category>react</category>
    </item>
    <item>
      <title>Error: [nodemon] app crashed - waiting for file changes before starting...</title>
      <dc:creator>Hafiz Saifullah</dc:creator>
      <pubDate>Wed, 22 Jul 2020 13:59:00 +0000</pubDate>
      <link>https://dev.to/hafizsaifullah/error-nodemon-app-crashed-waiting-for-file-changes-before-starting-ha9</link>
      <guid>https://dev.to/hafizsaifullah/error-nodemon-app-crashed-waiting-for-file-changes-before-starting-ha9</guid>
      <description>&lt;p&gt;Hey...! I am facing above error while trying to run &lt;br&gt;
&lt;code&gt;npm run dev-client&lt;/code&gt; in 2nd instance of terminal, while in 1st instance of terminal, there is already running both front-end and back-end servers by using &lt;code&gt;npm run dev&lt;/code&gt; command.&lt;/p&gt;

&lt;p&gt;Complete error message is given below...&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ npm run dev-peer

&amp;gt; crypto@1.0.0 dev-peer C:\Users\Education Use\crypto
&amp;gt; cross-env GENERATE_PEER_PORT='true' ENV='development' nodemon index.js   

[nodemon] 2.0.4
[nodemon] to restart at any time, enter `rs`
[nodemon] watching path(s): *.*
[nodemon] watching extensions: js,mjs,json
[nodemon] starting `node index.js`
listening at localhost: 3847
replace transaction pool map on a sync with {}
undefined:1
&amp;lt;!doctype html&amp;gt;
^

SyntaxError: Unexpected token &amp;lt; in JSON at position 0
    at JSON.parse (&amp;lt;anonymous&amp;gt;)
    at Request._callback (C:\Users\Education Use\crypto\index.js:95:36)    
    at Request.self.callback (C:\Users\Education Use\crypto\node_modules\request\request.js:185:22)
    at Request.emit (events.js:315:20)
    at Request.&amp;lt;anonymous&amp;gt; (C:\Users\Education Use\crypto\node_modules\request\request.js:1154:10)
    at Request.emit (events.js:315:20)
    at IncomingMessage.&amp;lt;anonymous&amp;gt; (C:\Users\Education Use\crypto\node_modules\request\request.js:1076:12)
    at Object.onceWrapper (events.js:421:28)
    at IncomingMessage.emit (events.js:327:22)
    at endReadableNT (_stream_readable.js:1221:12)
[nodemon] app crashed - waiting for file changes before starting...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;here is package.json file...&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "name": "crypto",
  "version": "1.0.0",
  "main": "index.js",
  "scripts": {
    "test": "jest --watchAll",
    "start": "npm run build-client &amp;amp;&amp;amp; node index.js",
    "dev": "concurrently \"npm run dev-client\" \"nodemon index.js\"",
    "dev-peer": "cross-env GENERATE_PEER_PORT='true' ENV='development' nodemon index.js",
    "start-redis": "redis-server --daemonize yes",
    "build-client": "npm run clean &amp;amp;&amp;amp; parcel build client/src/index.html --out-dir client/dist",
    "dev-client": "npm run clean &amp;amp;&amp;amp; parcel client/src/index.html --out-dir client/dist",
    "clean": "rm -rf .cache client/dist"
  },
  "jest": {
    "testEnvironment": "node"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "devDependencies": {
    "@babel/core": "^7.2.2",
    "@babel/plugin-proposal-class-properties": "^7.2.3",
    "cross-env": "^7.0.2",
    "jest": "^26.0.1",
    "nodemon": "^2.0.4"
  },
  "dependencies": {
    "body-parser": "^1.19.0",
    "concurrently": "^5.2.0",
    "elliptic": "^6.5.3",
    "express": "^4.17.1",
    "hex-to-binary": "^1.0.1",
    "history": "^4.7.2",
    "parcel-bundler": "^1.12.4",
    "pubnub": "^4.28.1",
    "react": "^16.13.1",
    "react-bootstrap": "^1.2.2",
    "react-dom": "^16.13.1",
    "react-router-dom": "^4.3.1",
    "redis": "^3.0.2",
    "request": "^2.88.2",
    "uuid": "^3.3.2"
  },
  "description": ""
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;What should i do to solve this issue???&lt;/p&gt;

</description>
      <category>node</category>
      <category>javascript</category>
      <category>react</category>
    </item>
    <item>
      <title>Now both Express and React servers are running by single `npm run dev` command</title>
      <dc:creator>Hafiz Saifullah</dc:creator>
      <pubDate>Fri, 17 Jul 2020 16:20:26 +0000</pubDate>
      <link>https://dev.to/hafizsaifullah/is-there-any-nodejs-developer-4j33</link>
      <guid>https://dev.to/hafizsaifullah/is-there-any-nodejs-developer-4j33</guid>
      <description>&lt;p&gt;I was facing a problem. I wanted to run both frontend and backend servers using single command &lt;code&gt;npm run dev&lt;/code&gt;, but it was not working.&lt;/p&gt;

&lt;p&gt;Issue Resolved by installing concurrently using &lt;br&gt;
&lt;code&gt;npm i concurrently --save&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;and changing dev script by&lt;br&gt;
&lt;code&gt;"dev": "concurrently \"npm run dev-client\" \"nodemon index.js\""&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;now I am getting Fine result as below...&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ npm run dev

&amp;gt; crypto@1.0.0 dev C:\Users\Education Use\crypto
&amp;gt; concurrently "npm run dev-client" "nodemon index.js"

[1] [nodemon] 2.0.4
[1] [nodemon] to restart at any time, enter `rs`
[1] [nodemon] watching path(s): *.*
[1] [nodemon] watching extensions: js,mjs,json
[1] [nodemon] starting `node index.js`
[0] 
[0] &amp;gt; crypto@1.0.0 dev-client C:\Users\Education Use\crypto
[0] &amp;gt; npm run clean &amp;amp;&amp;amp; parcel client/src/index.html --out-dir client/dist
[0] 
[1] listening at localhost: 3000
[0] 
[0] &amp;gt; crypto@1.0.0 clean C:\Users\Education Use\crypto
[0] &amp;gt; rm -rf .cache client/dist
[0] 
[0] Server running at http://localhost:1234 
Error: ENOENT: no such file or directory, stat 'C:\Users\Education Use\crypto\client\dist\index.html'
[1] [nodemon] restarting due to changes...
[1] [nodemon] restarting due to changes...
[1] [nodemon] restarting due to changes...
[1] [nodemon] restarting due to changes...
[0] ✨  Built in 51.89s.
[1] [nodemon] starting `node index.js`
[1] listening at localhost: 3000
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Thanx a lot for all of those Who granted their kind consideration.&lt;/p&gt;

</description>
      <category>npm</category>
      <category>node</category>
      <category>react</category>
    </item>
  </channel>
</rss>
