Илья Ломаев, Я воспроизвел ситуацию по вашим данным.
Инициировал стандартный package.json, добавил туда ваш devDependencies и выполнил установку пакетов. Создал простой scss файл с одним стилем и выполнил команду сборки.
Всё прошло как по маслу.
Проблема не в вашем gulp-файле.
консольный вывод
Microsoft Windows [Version 10.0.19043.2130]
(c) Корпорация Майкрософт (Microsoft Corporation). Все права защищены.
d:\temp\_000>npm init
This utility will walk you through creating a package.json file.
It only covers the most common items, and tries to guess sensible defaults.
See `npm help init` for definitive documentation on these fields
and exactly what they do.
Use `npm install <pkg>` afterwards to install a package and
save it as a dependency in the package.json file.
Press ^C at any time to quit.
package name: (_000)
Sorry, name cannot start with an underscore.
package name: (_000) qw
version: (1.0.0)
description:
entry point: (index.js)
test command:
git repository:
keywords:
author:
license: (ISC)
About to write to d:\temp\_000\package.json:
{
"name": "qw",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC"
}
Is this OK? (yes)
d:\temp\_000>npm install
npm WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated chokidar@2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
added 379 packages, and audited 380 packages in 28s
13 packages are looking for funding
run `npm fund` for details
6 high severity vulnerabilities
To address issues that do not require attention, run:
npm audit fix
To address all issues (including breaking changes), run:
npm audit fix --force
Run `npm audit` for details.
d:\temp\_000>gulp
[08:29:15] Using gulpfile d:\temp\_000\gulpfile.js
[08:29:16] Task never defined: default
[08:29:16] To list available tasks, try running: gulp --tasks
d:\temp\_000>gulp styles
[08:30:39] Using gulpfile d:\temp\_000\gulpfile.js
[08:30:39] Starting 'styles'...
[08:30:39] Finished 'styles' after 200 ms
d:\temp\_000>
не поэтому. Я же написал выше предположение – потому что в выборку попадают не ссылки. Конкретно – спаны. У них нет атрибутов href, и получается undefined
lagudal, я подозреваю, что проблема в запятой в селекторе $('.uxnav li a,') // Здесь
Повторюсь, что я не знаю какая будет выборка. Ну не приходило мне в голову этот странный случай потестить. Могу лишь предположить, что там в выборке помимо ссылко, будут и все остальные элементы, или еще какая-то дичь, кроме ссылок. А у всего, кроме ссылок отсутствует атрибут href. Вот вам и undefined.
lagudal, Эта ошибка значит, что в $(this).attr('href') у вас undefined.
Может запятая в селекторе лишняя. (Она там стопроцентно лишняя, но я не знаю как ведет себя выборка в таком случае).
Инициировал стандартный package.json, добавил туда ваш devDependencies и выполнил установку пакетов. Создал простой scss файл с одним стилем и выполнил команду сборки.
Всё прошло как по маслу.
Проблема не в вашем gulp-файле.