от съвсем скоро започнах да се уча върху локален сайт на WP, използвайки XAMPP, за да създам Базата данни и локален хост.
Инсталирах си VS code, както и доста допълнителни неща от Магазина му, за php,js,css,html и т.н.
Наложи ми се да дръпна и node.js, като при инсталирането нямах никакви проблеми. В терминала на VS-а нямах много, макар да се бе появил малък проблем с инсталирането на gulp, чрез интернет успях някак да оправя проблема.
НООО дойде момента, в който трябваше да изключа компютъра и след вкл. дойде проблем.
Сетих се разни команди, които може да тръгнат - nmp run, но при gulp пробвах какво ли не, накрая взех - gulp.cmd и учудващо, за мен всичко беше наред, поне нямах грешки, но и все още нищо не беше ок.
Преинсталирах, инсталирах ,повтарях едни и същи стъпки, но нищо. Сега единствената команда, която бачка е node -v и gulp.cmd, дори nmp -v не работи, а се предполага да е инсталиран.
Грешките се увеличиха. За първи път използвам node.js и признавам, че нямам никакви знания от към активирането на модули и т.н. и ми трябва помощ, тъй като имам желание да се науча. Няколко дни се рових из интернет пространството, намерих какви ли не идеи.
От вчера до днес ,цял ден пробвам какви ли не команди. Поне това, което разбрах е , че някъде нещо събаря "каруцата":усмивка1:
Иначе VS code-то ми бачка без проблеми, макар че не ми разбира нито една от функциите на wordpress темата.
ЧАСТ ОТ командите В cmd
Код: Избери всички
->npm install gulp-cli -g
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\us\AppData\Roaming\npm\node_modules\.staging\es5-ext-92dbae7c\function\#\not.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\us\AppData\Roaming\npm\node_modules\.staging\es5-ext-92dbae7c\test\function\#\not.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\us\AppData\Roaming\npm\node_modules\.staging\es5-ext-92dbae7c\number\#\pad.js'
npm WARN tar ENOENT: no such file or directory, open
/още около 100 такива реда
npm WARN tar ENOENT: no such file or directory, open
npm ERR! code ENOENT
npm ERR! syscall rename
npm ERR! path C:\Users\%\Roaming\npm\node_modules\gulp-cli\node_modules\ansi-regex
npm ERR! dest C:\Users\%\Roaming\npm\node_modules\gulp-cli\node_modules\.ansi-regex.DELETE
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, rename 'C:\Users\%\Roaming\npm\node_modules\gulp-cli\node_modules\ansi-regex' -> 'C:\Users\%\Roaming\npm\node_modules\gulp-cli\node_modules\.ansi-regex.DELETE'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\%\Roaming\npm-cache\_logs\2021-05-23T12_53_23_772Z-debug.log
C:\Users\us>npm install resolve-url
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN saveError ENOENT: no such file or directory, open 'C:\Users\us\package.json'
npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\us\package.json'
npm WARN us No description
npm WARN us No repository field.
npm WARN us No README data
npm WARN us No license field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"ia32"})
+ resolve-url@0.2.1
updated 1 package and audited 543 packages in 32.444s
7 packages are looking for funding
run `npm fund` for details
found 3 low severity vulnerabilities
run `npm audit fix` to fix them, or `npm audit` for details
C:\Users\us>npm fund
+-- https://github.com/sponsors/ljharb
| `-- resolve@1.20.0, is-core-module@2.4.0, object.assign@4.1.2, call-bind@1.0.2, has-symbols@1.0.2, get-intrinsic@1.1.1
`-- https://github.com/sponsors/isaacs
`-- glob@7.1.7
C:\Users\us>npm audit fix
npm ERR! code EAUDITNOPJSON
npm ERR! audit No package.json found: Cannot audit a project without a package.json
npm ERR! A complete log of this run can be found in:
npm ERR! C:\%\Roaming\npm-cache\_logs\2021-05-23T13_06_13_643Z-debug.log
[b]Terminal Visual Studio Code:[/b]
>nmp -v
nmp : The term 'nmp' is not recognized as the name of a cmdlet, function, script file, or operable progra
m. Check the spelling of the name, or if a path was included, verify that the path is correct and try aga
in.
At line:1 char:1
+ nmp -v
+ ~~~
+ CategoryInfo : ObjectNotFound: (nmp:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
PS C:\xampp\htdocs\wp-sites\wp-1\wp-content\themes\backbeach-my theme> node nmp -v
internal/modules/cjs/loader.js:888
throw err;
^
Error: Cannot find module 'C:\xampp\htdocs\wp-sites\wp-1\wp-content\themes\backbeach-my theme\nmp'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:885:15)
at Function.Module._load (internal/modules/cjs/loader.js:730:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
PS C:\xampp\htdocs\wp-sites\wp-1\wp-content\themes\backbeach-my theme> npm i gulp --global
npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules\gulp\node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"ia32"})
npm ERR! code EPERM
npm ERR! syscall unlink
npm ERR! path C:\%\Roaming\npm\node_modules\.staging\es5-ext-92dbae7c\object\normalize-options.js
npm ERR! errno -4048
npm ERR! Error: EPERM: operation not permitted, unlink 'C:\%\Roaming\npm\node_modules\.staging\es5-ext-92dbae7c\object\normalize-options.js'
npm ERR! [Error: EPERM: operation not permitted, unlink 'C:\%\Roaming\npm\node_modules\.staging\es5-ext-92dbae7c\object\normalize-options.js'] {
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'unlink',
t\\normalize-options.js'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It's possible that the file was already in use (by a text editor or antivirus),
npm ERR! or that you lack permissions to access it.
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\%\Roaming\npm-cache\_logs\2021-05-23T12_50_18_673Z-debug.log
PS C:\xampp\htdocs\wp-sites\wp-1\wp-content\themes\backbeach-my theme> npm i gulp
-същите редове от горното-
+ gulp@4.0.2
updated 1 package and audited 1170 packages in 166.976s
50 packages are looking for funding
run `npm fund` for details
found 279 vulnerabilities (1 low, 11 moderate, 267 high)
run `npm audit fix` to fix them, or `npm audit` for details
PS C:\xampp\htdocs\wp-sites\wp-1\wp-content\themes\backbeach-my theme> npm install gulp --save-dev
npm WARN registry Using stale data from https://registry.npmjs.org/ because the host is inaccessible -- are you offline?
npm WARN registry Using stale data from https://registry.npmjs.org/ due to a request error during revalidation.
npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules\glob-watcher\node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"ia32"})
npm WARN bootstrap@4.6.0 requires a peer of jquery@1.9.1 - 3 but none is installed. You must install peer
dependencies yourself.
dependencies yourself. dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.1 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"ia32n","arch":"any"} (current: {"os":"win32","arch":"ia32"})
+ gulp@4.0.2
updated 1 package and audited 1170 packages in 92.779s
50 packages are looking for funding
run `npm fund` for details
found 279 vulnerabilities (1 low, 11 moderate, 267 high)
run `npm audit fix` to fix them, or `npm audit` for details
PS C:\xampp\htdocs\wp-sites\wp-1\wp-content\themes\backbeach-my theme> gulp.cmd
[16:52:35] Using gulpfile C:\xampp\htdocs\wp-sites\wp-1\wp-content\themes\backbeach-my theme\gulpfile.js
[16:52:39] Starting 'default'...
[16:52:39] Starting 'watch'...
