npm run devs fails on a clean install

  node.js, npm, windows

npm run devs fails on a clean install

I’m following a course and when I run npm run dev on the code I just downloaded (and that works in the video) I get this error. I’ve reinstalled node and npm, deleted node_modules folder and packale-lock.json and ran npm install again, doesnt work.

Here’s the output

$ npm run dev

> [email protected] dev C:UsersAdministradorDesktopPWA-twittor-offline-posting
> ./node_modules/nodemon/bin/nodemon.js server/server

"." no se reconoce como un comando interno o externo,
programa o archivo por lotes ejecutable.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] dev: `./node_modules/nodemon/bin/nodemon.js server/server`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:UsersAdministradorAppDataRoamingnpm-cache_logs20-04-12T18_53_06_036Z-debug.log 

Here’s the debug log:

0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli   'C:Program Filesnodejsnode.exe',
1 verbose cli   'C:Program Filesnodejsnode_modulesnpmbinnpm-cli.js',
1 verbose cli   'run',
1 verbose cli   'dev'
1 verbose cli ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'predev', 'dev', 'postdev' ]
5 info lifecycle [email protected]~predev: [email protected]
6 info lifecycle [email protected]~dev: [email protected]
7 verbose lifecycle [email protected]~dev: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]~dev: PATH: C:Program Filesnodejsnode_modulesnpmnode_modulesnpm-lifecyclenode-gyp-bin;C:UsersAdministradorDesktopPWA-twittor-offline-postingnode_modules.bin;C:Program FilesGitmingw64bin;C:Program FilesGitusrbin;C:UsersAdministradorbin;C:Program FilesMicrosoft MPIBin;C:Python27;C:Python27Scripts;C:Program Files (x86)Common FilesOracleJavajavapath;C:Windowssystem32;C:Windows;C:WindowsSystem32Wbem;C:WindowsSystem32WindowsPowerShellv1.0;C:Program Files (x86)NVIDIA CorporationPhysXCommon;C:Program FilesCrucialCrucial Storage Executive;C:Program Files (x86)GtkSharp.12bin;C:WINDOWSsystem32;C:WINDOWS;C:WINDOWSSystem32Wbem;C:WINDOWSSystem32WindowsPowerShellv1.0;C:WINDOWSSystem32OpenSSH;C:Program FilesNVIDIA CorporationNVIDIA NvDLISR;C:Program FilesJavajdk1.8.0_201bin;C:apache-ant-1.10.7bin;C:Users UsuarioIdeaProjectsmysql-connector-java-5.1.48;C:ProgramDatachocolateybin;C:Program Filesdotnet;C:Program FilesMicrosoft SQL Server0ToolsBinn;C:Program FilesMicrosoft SQL ServerClient SDKODBC0ToolsBinn;C:Program Files (x86)Microsoft SQL Server0ToolsBinn;C:Program FilesMicrosoft SQL Server0ToolsBinn;C:Program Files (x86)Microsoft SQL Server0DTSBinn;C:Program FilesMicrosoft SQL Server0DTSBinn;C:Program FilesMicrosoft SQL ServerClient SDKODBC0ToolsBinn;C:Program Files (x86)Microsoft SQL Server0DTSBinn;C:Program FilesGitcmd;C:Program FilesMicrosoft VS Codebin;C:Program Files (x86)Microsoft SQL Server0ToolsBinn;C:Program FilesMicrosoft SQL Server0ToolsBinn;C:Program FilesMicrosoft SQL Server0DTSBinn;C:MinGWbin;C:Program Filesnodejs;C:UsersAdministradorAppDataRoaminglocalbin;C:UsersAdministradorAppDataLocalMicrosoftWindowsApps;C:UsersAdministradorAppDataLocalProgramsMicrosoft VS Codebin;C:UsersAdministradorAppDataRoamingnpm
9 verbose lifecycle [email protected]~dev: CWD: C:UsersAdministradorDesktopPWA-twittor-offline-posting
10 silly lifecycle [email protected]~dev: Args: [ '/d /s /c', './node_modules/nodemon/bin/nodemon.js server/server' ]
11 silly lifecycle [email protected]~dev: Returned: code: 1  signal: null
12 info lifecycle [email protected]~dev: Failed to exec dev script
13 verbose stack Error: [email protected] dev: `./node_modules/nodemon/bin/nodemon.js server/server`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (C:Program Filesnodejsnode_modulesnpmnode_modulesnpm-lifecycleindex.js:332:16)
13 verbose stack     at EventEmitter.emit (events.js:310:20)
13 verbose stack     at ChildProcess.<anonymous> (C:Program Filesnodejsnode_modulesnpmnode_modulesnpm-lifecyclelibspawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:310:20)
13 verbose stack     at maybeClose (internal/child_process.js:1021:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
14 verbose pkgid [email protected]
15 verbose cwd C:UsersAdministradorDesktopPWA-twittor-offline-posting
16 verbose Windows_NT 10.0.18362
17 verbose argv "C:Program Filesnodejsnode.exe" "C:Program Filesnodejsnode_modulesnpmbinnpm-cli.js" "run" "dev"
18 verbose node v12.16.2
19 verbose npm  v6.14.4
20 error code ELIFECYCLE
21 error errno 1
22 error [email protected] dev: `./node_modules/nodemon/bin/nodemon.js server/server`
22 error Exit status 1
23 error Failed at the [email protected] dev script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

And the package.json:

{
    "name": "twittor-server-client",
    "version": "1.0.0",
    "description": "",
    "main": "index.js",
    "scripts": {
        "test": "echo "Error: no test specified" && exit 1",
        "start": "node server/server.js",
        "dev": "./node_modules/nodemon/bin/nodemon.js server/server"
    },
    "author": "",
    "license": "ISC",
    "dependencies": {
        "express": "^4.16.3"
    },
    "devDependencies": {
        "nodemon": "^1.18.4",
        "webpack-dev-server": "^3.10.3"
    }
}

Says in the output that the “.” in front of the dev script path is not recognized but this is all auto-generated…


Source: StackOverflow

One Reply to “npm run devs fails on a clean install”

  • Hola, pudiste encontrar la solucion?, estoy en el mismo curso de PWA y tengo el mismo problema, ya me rompi la cabeza para encontrar la solucion y no encuentro nada

LEAVE A COMMENT