Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

npm start Microsoft JScript runtime error 800A138F object expected

Getting started with NPM...

I can run the following command to start my app.

node app

But when I run the following command, I get the following error:

npm start

Windows Script Host Object expected

Line 2

800A138F

Microsoft JScript runtime error

App.js:

var port = 5000;
var express = require('express');

Package.json:

{
  "name": "2",
  "version": "1.0.0",
  "description": "",
  "main": "app.js",
  "scripts": {
    "start": "app.js"
  },
  "author": "",
  "license": "ISC",
  "dependencies": {
    "express": "^4.13.3"
  }
}

And I've run this command of course:

npm install express --save

Seems like NPM can't find the express package? Why not?

like image 255
Hoppe Avatar asked Dec 30 '15 18:12

Hoppe


1 Answers

I know its too late to answer, but in case any wanderer like me faces the same problem in future..

Solution:

need to add node keyword ahead of app.js in script. So, start script should

"scripts": { "start": "node app.js" },

That solved for me.

like image 95
Zest Avatar answered Sep 18 '22 10:09

Zest