bem / bem-express

BEM project-stub with BEMTREE and express
43 stars 19 forks source link

Требование неподдерживаемого(опасного) пакета PhantomJS #159

Open LEv145 opened 2 years ago

LEv145 commented 2 years ago

При сборке получаю в лог такую ошибку:

npm ERR! code 1
npm ERR! path /home/lev145/Проекты/Проект БЭМ/node_modules/bem-core
npm ERR! command failed
npm ERR! command sh -c npm i jsdoc mocha-phantomjs
npm ERR! npm WARN EBADENGINE Unsupported engine {
npm ERR! npm WARN EBADENGINE   package: 'puml-link@0.0.1',
npm ERR! npm WARN EBADENGINE   required: { node: '0.10' },
npm ERR! npm WARN EBADENGINE   current: { node: 'v16.16.0', npm: '8.11.0' }
npm ERR! npm WARN EBADENGINE }
npm ERR! npm WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated
npm ERR! npm WARN deprecated stable@0.1.8: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility
npm ERR! npm WARN deprecated minimatch@3.0.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm ERR! npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm ERR! npm WARN deprecated transformers@2.1.0: Deprecated, use jstransformer
npm ERR! npm WARN deprecated browserslist@1.3.6: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm ERR! npm WARN deprecated cryptiles@2.0.5: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm ERR! npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm ERR! npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm ERR! npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm ERR! npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm ERR! npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm ERR! npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm ERR! npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm ERR! npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm ERR! npm WARN deprecated ini@1.1.0: Please update to ini >=1.3.6 to avoid a prototype pollution issue
npm ERR! npm WARN deprecated json3@3.3.2: Please use the native JSON object instead of JSON 3
npm ERR! npm WARN deprecated constantinople@3.0.2: Please update to at least constantinople 3.1.1
npm ERR! npm WARN deprecated cryptiles@0.2.2: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm ERR! npm WARN deprecated graceful-fs@2.0.3: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
npm ERR! npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
npm ERR! npm WARN deprecated csswring@4.2.3: Package no longer supported. Contact support@npmjs.com for more info.
npm ERR! npm WARN deprecated xmldom@0.1.31: Deprecated due to CVE-2021-21366 resolved in 0.5.0
npm ERR! npm WARN deprecated jshint-groups@0.8.0: Use eslint instead
npm ERR! npm WARN deprecated jscs-preset-wikimedia@1.0.1: No longer maintained. We recomment migrating to ESLint with eslint-config-wikimedia.
npm ERR! npm WARN deprecated boom@0.4.2: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm ERR! npm WARN deprecated npmconf@0.0.24: this package has been reintegrated into npm and is now out of date with respect to npm
npm ERR! npm WARN deprecated boom@2.10.1: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm ERR! npm WARN deprecated minimatch@0.4.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm ERR! npm WARN deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm ERR! npm WARN deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm ERR! npm WARN deprecated node-uuid@1.4.0: Use uuid module instead
npm ERR! npm WARN deprecated sntp@0.2.4: This module moved to @hapi/sntp. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
npm ERR! npm WARN deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm ERR! npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm ERR! npm WARN deprecated sntp@1.0.9: This module moved to @hapi/sntp. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
npm ERR! npm WARN deprecated nomnom@1.8.1: Package no longer supported. Contact support@npmjs.com for more info.
npm ERR! npm WARN deprecated mkdirp@0.3.5: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm ERR! npm WARN deprecated mkdirp@0.3.5: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm ERR! npm WARN deprecated request@2.36.0: request has been deprecated, see https://github.com/request/request/issues/3142
npm ERR! npm WARN deprecated mkdirp@0.3.5: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm ERR! npm WARN deprecated mkdirp@0.3.0: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm ERR! npm WARN deprecated uuid@2.0.3: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm ERR! npm WARN deprecated tough-cookie@2.2.2: ReDoS vulnerability parsing Set-Cookie https://nodesecurity.io/advisories/130
npm ERR! npm WARN deprecated bem-xjst@0.6.1: v0.x is deprecated. Use v4.x or newer
npm ERR! npm WARN deprecated hoek@0.9.1: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm ERR! npm WARN deprecated node-uuid@1.4.8: Use uuid module instead
npm ERR! npm WARN deprecated coa@1.0.3: Please upgrade to 1.0.4 for node 0.10, 0.12, or to 2.0+ for node 4+
npm ERR! npm WARN deprecated mkdirp@0.5.0: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm ERR! npm WARN deprecated bem-xjst@1.2.1: v1.x is deprecated. Use v4.x or newer. See https://github.com/bem/bem-xjst/wiki/Migration-guides
npm ERR! npm WARN deprecated bem-xjst@1.2.1: v1.x is deprecated. Use v4.x or newer. See https://github.com/bem/bem-xjst/wiki/Migration-guides
npm ERR! npm WARN deprecated har-validator@2.0.6: this library is no longer supported
npm ERR! npm WARN deprecated hoek@2.16.3: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm ERR! npm WARN deprecated mkdirp@0.5.1: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm ERR! npm WARN deprecated mkdirp@0.5.1: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm ERR! npm WARN deprecated request@2.67.0: request has been deprecated, see https://github.com/request/request/issues/3142
npm ERR! npm WARN deprecated hawk@1.0.0: This module moved to @hapi/hawk. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
npm ERR! npm WARN deprecated hawk@3.1.3: This module moved to @hapi/hawk. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
npm ERR! npm WARN deprecated jade@0.26.3: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm ERR! npm WARN deprecated jade@1.11.0: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm ERR! npm WARN deprecated mocha@1.20.1: Mocha v1.x is no longer supported.
npm ERR! npm WARN deprecated istanbul@0.2.16: This module is no longer maintained, try this instead:
npm ERR! npm WARN deprecated   npm i nyc
npm ERR! npm WARN deprecated Visit https://istanbul.js.org/integrations for other alternatives.
npm ERR! npm WARN deprecated highlight.js@7.5.0: Version no longer supported. Upgrade to @latest
npm ERR! npm WARN deprecated istanbul@0.4.5: This module is no longer maintained, try this instead:
npm ERR! npm WARN deprecated   npm i nyc
npm ERR! npm WARN deprecated Visit https://istanbul.js.org/integrations for other alternatives.
npm ERR! npm WARN deprecated highlight.js@9.18.5: Support has ended for 9.x series. Upgrade to @latest
npm ERR! npm WARN deprecated jscs@2.11.0: JSCS has merged with ESLint! See - https://medium.com/@markelog/jscs-end-of-the-line-bc9bf0b3fdb2
npm ERR! npm WARN deprecated core-js@1.2.7: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
npm ERR! npm ERR! code 1
npm ERR! npm ERR! path /home/lev145/Проекты/Проект БЭМ/node_modules/bem-core/node_modules/phantomjs
npm ERR! npm ERR! command failed
npm ERR! npm ERR! command sh -c node install.js
npm ERR! npm ERR! PhantomJS not found on PATH
npm ERR! npm ERR! Phantom installation failed TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
npm ERR! npm ERR!     at new NodeError (node:internal/errors:372:5)
npm ERR! npm ERR!     at validateString (node:internal/validators:120:11)
npm ERR! npm ERR!     at Object.join (node:path:1172:7)
npm ERR! npm ERR!     at findSuitableTempDirectory (/home/lev145/Проекты/Проект БЭМ/node_modules/bem-core/node_modules/phantomjs/install.js:127:30)
npm ERR! npm ERR!     at /home/lev145/Проекты/Проект БЭМ/node_modules/bem-core/node_modules/phantomjs/install.js:476:19
npm ERR! npm ERR!     at nextTickCallback (/home/lev145/Проекты/Проект БЭМ/node_modules/bem-core/node_modules/kew/kew.js:47:28)
npm ERR! npm ERR!     at processTicksAndRejections (node:internal/process/task_queues:78:11) {
npm ERR! npm ERR!   code: 'ERR_INVALID_ARG_TYPE'
npm ERR! npm ERR! } TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
npm ERR! npm ERR!     at new NodeError (node:internal/errors:372:5)
npm ERR! npm ERR!     at validateString (node:internal/validators:120:11)
npm ERR! npm ERR!     at Object.join (node:path:1172:7)
npm ERR! npm ERR!     at findSuitableTempDirectory (/home/lev145/Проекты/Проект БЭМ/node_modules/bem-core/node_modules/phantomjs/install.js:127:30)
npm ERR! npm ERR!     at /home/lev145/Проекты/Проект БЭМ/node_modules/bem-core/node_modules/phantomjs/install.js:476:19
npm ERR! npm ERR!     at nextTickCallback (/home/lev145/Проекты/Проект БЭМ/node_modules/bem-core/node_modules/kew/kew.js:47:28)
npm ERR! npm ERR!     at processTicksAndRejections (node:internal/process/task_queues:78:11)
npm ERR! 
npm ERR! npm ERR! A complete log of this run can be found in:
npm ERR! npm ERR!     /home/lev145/.npm/_logs/2022-08-18T16_20_03_258Z-debug-0.log

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/lev145/.npm/_logs/2022-08-18T16_18_04_590Z-debug-0.log

Я в node.js новичёк, думаю, что дело в каких-то зависимостях проекта, тк в инструкции про PhantomJS ничего не нашёл

LEv145 commented 2 years ago

Причём как я выяснил, PhantomJS уже мёртв, а его использование небезопасно https://github.com/ariya/phantomjs/issues/15344

LEv145 commented 2 years ago

Нашёл решение, сам не проверял, но может кому поможет изображение