Я следую за курсом, и когда я запускаю npm, запускаю dev для только что загруженного кода (и это работает в видео), я получаю эту ошибку. Я переустановил узел и npm, удалил папку node_modules и packale-lock. json и запустил npm установить снова, не работает.
Вот вывод
$ npm run dev
> twittor-server-client@1.0.0 dev C:\Users\Administrador\Desktop\PWA\10-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! twittor-server-client@1.0.0 dev: `./node_modules/nodemon/bin/nodemon.js server/server`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the twittor-server-client@1.0.0 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:\Users\Administrador\AppData\Roaming\npm-cache\_logs\2020-04-12T18_53_06_036Z-debug.log
Вот журнал отладки:
0 info it worked if it ends with ok
1 verbose cli [
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 'run',
1 verbose cli 'dev'
1 verbose cli ]
2 info using npm@6.14.4
3 info using node@v12.16.2
4 verbose run-script [ 'predev', 'dev', 'postdev' ]
5 info lifecycle twittor-server-client@1.0.0~predev: twittor-server-client@1.0.0
6 info lifecycle twittor-server-client@1.0.0~dev: twittor-server-client@1.0.0
7 verbose lifecycle twittor-server-client@1.0.0~dev: unsafe-perm in lifecycle true
8 verbose lifecycle twittor-server-client@1.0.0~dev: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\Administrador\Desktop\PWA\10-twittor-offline-posting\node_modules\.bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Users\Administrador\bin;C:\Program Files\Microsoft MPI\Bin;C:\Python27;C:\Python27\Scripts;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Crucial\Crucial Storage Executive;C:\Program Files (x86)\GtkSharp\2.12\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files\Java\jdk1.8.0_201\bin;C:\apache-ant-1.10.7\bin;C:\Users\ Usuario\IdeaProjects\mysql-connector-java-5.1.48;C:\ProgramData\chocolatey\bin;C:\Program Files\dotnet;C:\Program Files\Microsoft SQL Server\130\Tools\Binn;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn;C:\Program Files\Microsoft SQL Server\140\Tools\Binn;C:\Program Files (x86)\Microsoft SQL Server\140\DTS\Binn;C:\Program Files\Microsoft SQL Server\140\DTS\Binn;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn;C:\Program Files (x86)\Microsoft SQL Server\150\DTS\Binn;C:\Program Files\Git\cmd;C:\Program Files\Microsoft VS Code\bin;C:\Program Files (x86)\Microsoft SQL Server\150\Tools\Binn;C:\Program Files\Microsoft SQL Server\150\Tools\Binn;C:\Program Files\Microsoft SQL Server\150\DTS\Binn;C:\MinGW\bin;C:\Program Files\nodejs;C:\Users\Administrador\AppData\Roaming\local\bin;C:\Users\Administrador\AppData\Local\Microsoft\WindowsApps;C:\Users\Administrador\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\Administrador\AppData\Roaming\npm
9 verbose lifecycle twittor-server-client@1.0.0~dev: CWD: C:\Users\Administrador\Desktop\PWA\10-twittor-offline-posting
10 silly lifecycle twittor-server-client@1.0.0~dev: Args: [ '/d /s /c', './node_modules/nodemon/bin/nodemon.js server/server' ]
11 silly lifecycle twittor-server-client@1.0.0~dev: Returned: code: 1 signal: null
12 info lifecycle twittor-server-client@1.0.0~dev: Failed to exec dev script
13 verbose stack Error: twittor-server-client@1.0.0 dev: `./node_modules/nodemon/bin/nodemon.js server/server`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:310:20)
13 verbose stack at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.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 twittor-server-client@1.0.0
15 verbose cwd C:\Users\Administrador\Desktop\PWA\10-twittor-offline-posting
16 verbose Windows_NT 10.0.18362
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-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 twittor-server-client@1.0.0 dev: `./node_modules/nodemon/bin/nodemon.js server/server`
22 error Exit status 1
23 error Failed at the twittor-server-client@1.0.0 dev script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
И пакет. 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"
}
}
В выводе говорится, что "." перед сценарием dev путь не распознается, но все это автоматически генерируется ...