title: Getting error TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension "" for D:\Projects\matri-site\bin\www for Node Js v14
body: <p>I am new to Node js and got some issues. Previously I was using node Js v13.8 to run my express application and it was working very well. I was using es6 syntax and type module having JS extension files. But, when I upgraded to Node 14.1.0. It's showing the following error(Same error with 13.9 as well).</p>
  
  <p><strong>TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension "" for D:\Projects\matri-site\bin\www</strong>.</p>
  
  <p><a href="https://i.stack.imgur.com/rJt3k.png" rel="noreferrer">Here is my error snippet</a></p>
  
  <p>Again when I downgraded to Node 13.8, it works fine.</p>
  
  <p>Here is my package.json file :</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>{
    "name": "matri-site",
    "version": "0.0.0",
    "private": true,
    "type": "module",
    "scripts": {
      "start": "node ./bin/www"
    },
    "dependencies": {
      "bcryptjs": "^2.4.3",
      "buffer": "^5.5.0",
      "cookie-parser": "~1.4.4",
      "debug": "~2.6.9",
      "express": "4.16.1",
      "handlebars": "^4.7.6",
      "http-errors": "~1.6.3",
      "jade": "~1.11.0",
      "jsonwebtoken": "^8.5.1",
      "mongoose": "^5.8.9",
      "morgan": "~1.9.1",
      "nodemailer": "^6.4.2",
      "redis": "^3.0.2",
      "validator": "^12.1.0",
      "validatorjs": "^3.18.1"
    },
    "devDependencies": {
      "eslint": "^6.8.0"
    }
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p>Here is my WWW file:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>#!/usr/bin/env node
  
  /**
   * Module dependencies.
   */
  
  // var app = require('../app');
  // var debug = require('debug')('matri-site:server');
  // var http = require('http');
  
  import app from '../app.js';
  import debug from "debug";
   debug.debug('matri-site:server');
  import http from "http";
  
  /**
   * Get port from environment and store in Express.
   */
  
  var port = normalizePort(process.env.PORT || '3000');
  app.set('port', port);
  
  /**
   * Create HTTP server.
   */
  
  var server = http.createServer(app);
  
  /**
   * Listen on provided port, on all network interfaces.
   */
  
  server.listen(port);
  server.on('error', onError);
  server.on('listening', onListening);
  
  /**
   * Normalize a port into a number, string, or false.
   */
  
  function normalizePort(val) {
    var port = parseInt(val, 10);
  
    if (isNaN(port)) {
      // named pipe
      return val;
    }
  
    if (port &gt;= 0) {
      // port number
      return port;
    }
  
    return false;
  }
  
  /**
   * Event listener for HTTP server "error" event.
   */
  
  function onError(error) {
    if (error.syscall !== 'listen') {
      throw error;
    }
  
    var bind = typeof port === 'string'
      ? 'Pipe ' + port
      : 'Port ' + port;
  
    // handle specific listen errors with friendly messages
    switch (error.code) {
      case 'EACCES':
        console.error(bind + ' requires elevated privileges');
        process.exit(1);
        break;
      case 'EADDRINUSE':
        console.error(bind + ' is already in use');
        process.exit(1);
        break;
      default:
        throw error;
    }
  }
  
  /**
   * Event listener for HTTP server "listening" event.
   */
  
  function onListening() {
    var addr = server.address();
    var bind = typeof addr === 'string'
      ? 'pipe ' + addr
      : 'port ' + addr.port;
    debug('Listening on ' + bind);
  }</code></pre>
  </div>
  </div>
  </p>