Skip to content

Instantly share code, notes, and snippets.

@airtonix
Created August 30, 2018 02:04
Show Gist options
  • Select an option

  • Save airtonix/b1172767ea236e88cc1215921c204b3e to your computer and use it in GitHub Desktop.

Select an option

Save airtonix/b1172767ea236e88cc1215921c204b3e to your computer and use it in GitHub Desktop.
const express = require('express');
const serveStatic = require('serve-static');
const STATIC_ROOT = '/static/';
const app = express();
@airtonix
Copy link
Author

Error is

<HOME>/.nvm/versions/node/v8.11.3/bin/npx -p=express -p=serve-static --node-arg=--inspect dev/tools/middleware.js 
npx: installed 68 in 2.384s
Debugger listening on ws://127.0.0.1:9229/488e2047-7d48-4ccf-9829-6821a76149a0
module.js:549
    throw err;
    ^
Error: Cannot find module 'express'
    at Function.Module._resolveFilename (module.js:547:15)
    at Function.Module._load (module.js:474:25)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (<HOME>/Projects/<PROJECT>/dev/tools/middleware.js:1:79)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment