S
S
sergey19892015-11-14 02:11:53
Node.js
sergey1989, 2015-11-14 02:11:53

Error while running npm?

Good day. After the npm start command, errors appear in the console. How can the problem be solved? 1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe', 1 verbose cli 'C:\\Program Files\\
nodejs \\node_modules\\npm\ \bin\\npm-cli.js', 1 verbose cli 'start' ] 2 info using [email protected] 3 info using [email protected] 4 verbose config Skipping project config: C:\Users\Sergey/.npmrc . (matches userconfig) 5 verbose stack Error: ENOENT, open 'C:\Users\Sergey\package.json' 5 verbose stack at Error (native) 6 verbose cwd C:\Users\Sergey 7 error Windows_NT 6.1.7601
8 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
9 error node v0.12.7
10 error npm v2.11.3
11 error path C:\Users\Sergey\package.json
12 error code ENOENT
13 error errno -4058
14 error enoent ENOENT, open 'C:\Users\Sergey\package.json '
14 error enoent This is most likely not a problem with npm itself
14 error enoent and is related to npm not being able to find a file.
15 verbose exit [ -4058, true ]

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Aves, 2015-11-14
@Aves

npm start [-- <args>]
This runs an arbitrary command specified in the package's "start" property of its "scripts" object. If no "start" property is specified on the "scripts" object, it will run node server.js.
Obviously, you need to create a package.json and write the desired command there.
{
  "scripts": {
    "start": "node server.js"
  }
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question