Questions tagged [express-generator]

84 questions
11
votes
3 answers

express or express-generator: do i need both?

Just exploring node.js and came across express; On the npm repository site https://www.npmjs.com/package/express it clearly states installation is $ npm install express but if i scroll down the quick start mentions $ npm install -g…
joedotnot
  • 4,810
  • 8
  • 59
  • 91
7
votes
1 answer

Which command should I use to minify and optimize nodejs express application?

I am ready with an Express-generator sccafold website and need to publish it. Which command should I use to minify files and be optimized for publishing? And also, what are the directories should I take to upload?
samu101108
  • 675
  • 7
  • 23
6
votes
2 answers

npm ERR! semver.simplifyRange is not a function

Trying to follow the Express getting started tutorial. I generated an app and ran npm install following the provided instructions. > npx express-generator --view=pug myapp > npm install npm ERR! semver.simplifyRange is not a function npm ERR! A…
Increasingly Idiotic
  • 5,700
  • 5
  • 35
  • 73
6
votes
1 answer

spawn ENOENT node.js error

I have started a node.js app with the express-generator, I have a strange issue where I can't view a page via the browser twice, first time it loads fine, second time it doesn't as the node process ends with the following error: GET / 304…
filype
  • 8,034
  • 10
  • 40
  • 66
5
votes
2 answers

Error when install express-generator using npm

I tried to install express-generator using the command npm install express-generator but I get the following error. I searched in the web and could not find any helpful answers for this. npm WARN deprecated mkdirp@0.5.1: Legacy versions of mkdirp…
Poorna
  • 105
  • 1
  • 2
  • 10
5
votes
2 answers

npm global install gives EISDIR warnings and ENOENT error

I am trying to install express-generator using npm install express-generator -g. However I'm getting errors. WARN tar EISDIR: illegal operation on a directory, open '/usr/local/lib/node_modules/.staging/ejs-2de19af3/lib'026584d.lock for…
Increasingly Idiotic
  • 5,700
  • 5
  • 35
  • 73
5
votes
1 answer

How to use html-webpack-plugin with existing express templates?

I've intalled the express-generetor npm module and like how the project is structured with the jade files used as templates. However I also like to use the HTML-webpack-plugin which generates its own files, what is the best way to go about…
SuperUberDuper
  • 9,242
  • 9
  • 39
  • 72
4
votes
2 answers

Why use bin/www and not index.js?

The express-generator tool creates a file called bin/www and uses it as the application's main entry-point. I believe I've seen a couple of other modules do this as well, but the vast majority simply use index.js. What is the rationale behind this?…
3
votes
3 answers

Cannot bootstrap an Express project using the express-generator tool

I've installed Node.js, express.js and the express-generator globally. But when I try to create a new project using the express at the CLI, I get this error: module.js:471 throw err; ^ Error: Cannot find module 'commander' …
3
votes
3 answers

Where to place the front-end javascript files?

I am developing an express based web application and I started following the application skeleton built by express-generator. Next, I added to my project webpack to bundle the client side assets. Now I am not sure where to place the front-end…
Miguel Gamboa
  • 8,855
  • 7
  • 47
  • 94
3
votes
0 answers

Cannot get Express Generator to work properly Windows 10

So I am trying to follow this tutorial: https://blog.udemy.com/node-js-tutorial/ I ran npm install -g express-generator in my CMD prompt and it seemingly installs fine. No errors. I then try to run express test1 in my app folder which is C:\node>…
user1527555
  • 155
  • 1
  • 9
2
votes
1 answer

What is the equivalent command of "express-generator --view=pug my_app" for "express-generator-typescript"?

In JavaScript version of NodeJS there is a command as express-generator --view=pug my_app, but what about express-generator-typescript? Does --view=pug also works with TypeScript version of NodeJS or we should use another option? Or maybe it uses…
GoodMan
  • 542
  • 6
  • 19
2
votes
1 answer

express --view=hbs myapp getting [ERR_INVALID_CALLBACK]: Callback must be a function

- express --view=hbs myapp [node version 12.18.2] Getting error like this TypeError [ERR_INVALID_CALLBACK]: Callback must be a function
Jay Suchak
  • 172
  • 1
  • 10
2
votes
0 answers

app.use() routing using express-generator

I'm using express-generator. The following codes are in app.js 1- The following two routings: **app.use('/', indexRouter); app.use('/users', usersRouter);** 2- Andthe following are defined **var indexRouter = require('./routes/index'); var…
2
votes
1 answer

Package express generated app using pkg

I have created an express app using the express-generator like this: express work-callendar.I haven't changed anything.Now I want to pack it using the pkg command so I created the following script in my package.json "package":"pkg .-t…
Manos Kounelakis
  • 2,848
  • 5
  • 31
  • 55
1
2 3 4 5 6