简体   繁体   English

NPM 警告:“不支持的引擎”

[英]NPM warning: 'unsupported engine'

I entered the command npm install -D tailwind css postcss autoprefixer vite in VS-Code.我在 VS-Code 中输入了命令npm install -D tailwind css postcss autoprefixer vite

My environment is:我的环境是:

  • NPM version: 8.1.2 NPM 版本: 8.1.2
  • Node.js version: 16.13.1 Node.js 版本: 16.13.1

Which resulted in following warning:这导致了以下警告:

npm WARN idealTree Removing dependencies.vite in favor of devDependencies.vite
npm WARN EBADENGINE Unsupported engine {    
npm WARN EBADENGINE   package: 'amqplib@0.5.2',    
npm WARN EBADENGINE   required: { node: '>=0.8 <=9' },
npm WARN EBADENGINE   current: { node: 'v16.13.1', npm: '8.1.2' }
npm WARN EBADENGINE }

My package.json is: { "name": "tailwind-css-part-7", "version": "1.0.0", "main": "index.js", "devDependencies": { "autoprefixer": "^10.4.2", "css": "^3.0.0", "postcss": "^8.4.5", "tailwind": "^4.0.0", "vite": "^2.7.10" }, "scripts": { "start": "vite" }, "keywords": [], "author": "", "license": "ISC", "dependencies": { "accepts": "^1.3.7", "ajv": "^6.10.0", "amqplib": "^0.5.2", "ansi-styles": "^3.2.1", "app-root-path": "^2.1.0", "array-flatten": "^1.1.1", "asn1": "^0.2.3", "async-limiter": "^1.0.1", "async-retry": "^1.2.3", "atob": "^2.1.2", "babel-runtime": "^6.26.0", "basic-auth": "^2.0.1", "bitsyntax": "^0.0.4", "bluebird": "^3.7.2", "body-parser": "^1.18.3", "browserslist": "^4.19.1", "buffer-equal-constant-time": "^1.0.1", "buffer-more-ints": "^0.0.2", "bytes": "^3.0.0", "call-bind": "^1.0.2", "caniuse-lite": "^1.0.30001296", "chalk": "^2.4.1", "color-convert": "^1.9.3", "color-name": "^1.1.3", "commands-events": "^1.0.4", "comparejs": "^1.0.0", "compressible": "^2.0.18", "compression": "^1.7.3", "content-disposition": "^0.5.2", "content-type": "^1.0.4", "cookie": "^0.3.1", "cookie-signature": "^1.0.6", "core-js": "^2.6.12", "core-util-is": "^1.0.3", "cors": "^2.8.5", "crypto2": "^2.0.0", "datasette": "^1.0.1", "debug": "^2.6.9", "decode-uri-component": "^0.2.0", "define-properties": "^1.1.3", "depd": "^1.1.2", "destroy": "^1.0.4", "draht": "^1.0.1", "ecdsa-sig-formatter": "^1.0.11", "ee-first": "^1.1.1", "electron-to-chromium": "^1.4.35", "encodeurl": "^1.0.2", "es-abstract": "^1.19.1", "es-to-primitive": "^1.2.1", "esbuild": "^0.13.15", "esbuild-windows-64": "^0.13.15", "escalade": "^3.1.1", "escape-html": "^1.0.3", "escape-string-regexp": "^1.0.5", "etag": "^1.8.1", "eventemitter2": "^5.0.1", "express": "^4.16.4", "fast-deep-equal": "^2.0.1", "fast-json-stable-stringify": "^2.1.0", "finalhandler": "^1.1.1", "find-root": "^1.1.0", "flaschenpost": "^5.0.49", "formats": "^1.0.0", "forwarded": "^0.2.0", "fraction.js": "^4.1.2", "fresh": "^0.5.2", "function-bind": "^1.1.1", "get-intrinsic": "^1.1.1", "get-own-enumerable-property-symbols": "^3.0.2", "get-symbol-description": "^1.0.0", "has": "^1.0.3", "has-bigints": "^1.0.1", "has-flag": "^3.0.0", "has-symbols": "^1.0.2", "has-tostringtag": "^1.0.0", "hase": "^2.0.0", "http-errors": "^1.6.3", "iconv-lite": "^0.4.23", "inherits": "^2.0.4", "internal-slot": "^1.0.3", "ipaddr.js": "^1.9.1", "is-bigint": "^1.0.4", "is-boolean-object": "^1.1.2", "is-callable": "^1.2.4", "is-core-module": "^2.8.0", "is-date-object": "^1.0.5", "is-negative-zero": "^2.0.2", "is-number-object": "^1.0.6", "is-obj": "^1.0.1", "is-regex": "^1.1.4", "is-regexp": "^1.0.0", "is-shared-array-buffer": "^1.0.1", "is-string": "^1.0.7", "is-symbol": "^1.0.4", "is-weakref": "^1.0.2", "isarray": "^0.0.1", "json-lines": "^1.0.0", "json-schema-traverse": "^0.4.1", "jsonwebtoken": "^8.5.0", "jwa": "^1.4.1", "jws": "^3.2.2", "limes": "^2.0.0", "lodash": "^4.17.11", "lodash.includes": "^4.3.0", "lodash.isboolean": "^3.0.3", "lodash.isinteger": "^4.0.4", "lodash.isnumber": "^3.0.3", "lodash.isplainobject": "^4.0.6", "lodash.isstring": "^4.0.1", "lodash.once": "^4.1.1", "lusca": "^1.6.1", "media-typer": "^0.3.0", "merge-descriptors": "^1.0.1", "methods": "^1.1.2", "mime": "^1.4.1", "mime-db": "^1.51.0", "mime-types": "^2.1.34", "moment": "^2.22.2", "morgan": "^1.9.1", "ms": "^2.0.0", "nanoid": "^3.1.30", "negotiator": "^0.6.2", "nocache": "^2.0.0", "node-releases": "^2.0.1", "node-rsa": "^0.4.2", "node-statsd": "^0.1.1", "normalize-range": "^0.1.2", "object-assign": "^4.1.1", "object-inspect": "^1.12.0", "object-keys": "^1.1.1", "object.assign": "^4.1.2", "object.getownpropertydescriptors": "^2.1.3", "on-finished": "^2.3.0", "on-headers": "^1.0.2", "parseurl": "^1.3.3", "partof": "^1.0.0", "path-parse": "^1.0.7", "path-to-regexp": "^0.1.7", "picocolors": "^1.0.0", "postcss-value-parser": "^4.2.0", "processenv": "^1.1.0", "proxy-addr": "^2.0.7", "punycode": "^2.1.1", "qs": "^6.5.2", "range-parser": "^1.2.1", "raw-body": "^2.3.3", "readable-stream": "^1.1.14", "regenerator-runtime": "^0.12.1", "resolve": "^1.21.0", "retry": "^0.12.0", "rollup": "^2.63.0", "safe-buffer": "^5.1.2", "safer-buffer": "^2.1.2", "semver": "^5.7.1", "send": "^0.16.2", "serve-static": "^1.13.2", "setprototypeof": "^1.1.0", "sha-1": "^0.1.1", "side-channel": "^1.0.4", "source-map": "^0.6.1", "source-map-js": "^1.0.1", "source-map-resolve": "^0.6.0", "split2": "^3.0.0", "stack-trace": "^0.0.10", "statuses": "^1.4.0", "stethoskop": "^1.0.0", "string_decoder": "^0.10.31", "string.prototype.trimend": "^1.0.4", "string.prototype.trimstart": "^1.0.4", "stringify-object": "^3.3.0", "supports-color": "^5.5.0", "supports-preserve-symlinks-flag": "^1.0.0", "timer2": "^1.0.0", "tsscmp": "^1.0.6", "type-is": "^1.6.18", "unbox-primitive": "^1.0.1", "unpipe": "^1.0.0", "untildify": "^3.0.3", "uri-js": "^4.4.1", "util-deprecate": "^1.0.2", "util.promisify": "^1.0.0", "utils-merge": "^1.0.1", "uuid": "^3.3.2", "uuidv4": "^3.0.1", "varname": "^2.0.3", "vary": "^1.1.2", "which-boxed-primitive": "^1.0.2", "ws": "^6.2.0" }, "description": "" }我的 package.json 是: { "name": "tailwind-css-part-7", "version": "1.0.0", "main": "index.js", "devDependencies": { "autoprefixer": "^10.4.2", "css": "^3.0.0", "postcss": "^8.4.5", "tailwind": "^4.0.0", "vite": "^2.7.10" }, "scripts": { "start": "vite" }, "keywords": [], "author": "", "license": "ISC", "dependencies": { "accepts": "^1.3.7", "ajv": "^6.10.0", "amqplib": "^0.5.2", "ansi-styles": "^3.2.1", "app-root-path": "^2.1.0", "array-flatten": "^1.1.1", "asn1": "^0.2.3", "async-limiter": "^1.0.1", "async-retry": "^1.2.3", "atob": "^2.1.2", "babel-runtime": "^6.26.0", "basic-auth": "^2.0.1", "bitsyntax": "^0.0.4", "bluebird": "^3.7.2", "body-parser": "^1.18.3", "browserslist": "^4.19.1", "buffer-equal-constant-time": "^1.0.1", "buffer-more-ints": "^0.0.2", "bytes": "^3.0.0", "call-bind": "^1.0.2", "caniuse-lite": "^1.0.30001296", "chalk": "^2.4.1", "color-convert": "^1.9.3", "color-name": "^1.1.3", "commands-events": "^1.0.4", "comparejs": "^1.0.0", "compressible": "^2.0.18", "compression": "^1.7.3", "content-disposition": "^0.5.2", "content-type": "^1.0.4", "cookie": "^0.3.1", "cookie-signature": "^1.0.6", "core-js": "^2.6.12", "core-util-is": "^1.0.3", "cors": "^2.8.5", "crypto2": "^2.0.0", "datasette": "^1.0.1", "debug": "^2.6.9", "decode-uri-component": "^0.2.0", "define-properties": "^1.1.3", "depd": "^1.1.2", "destroy": "^1.0.4", "draht": "^1.0.1", "ecdsa-sig-formatter": "^1.0.11", "ee-first": "^1.1.1", "electron-to-chromium": "^1.4.35", "encodeurl": "^1.0.2", "es-abstract": "^1.19.1", "es-to-primitive": "^1.2.1", "esbuild": "^0.13.15", "esbuild-windows-64": "^0.13.15", "escalade": "^3.1.1", "escape-html": "^1.0.3", "escape-string-regexp": "^1.0.5", "etag": "^1.8.1", "eventemitter2": "^5.0.1", "express": "^4.16.4", "fast-deep-equal": "^2.0.1", "fast-json-stable-stringify": "^2.1.0", "finalhandler": "^1.1.1", "find-root": "^1.1.0", "flaschenpost": "^5.0.49", "formats": "^1.0.0", "forwarded": "^0.2.0", "fraction.js": "^4.1.2", "fresh": "^0.5.2", "function-bind": "^1.1.1", "get-intrinsic": "^1.1.1", "get-own-enumerable-property-symbols": "^3.0.2", "get-symbol-description": "^1.0.0", "has": "^1.0.3", "has-bigints": "^1.0.1", "has-flag": "^3.0.0", "has-symbols": "^1.0.2", "has-tostringtag": "^1.0.0", "hase": "^2.0.0", "http-errors": "^1.6.3", "iconv-lite": "^0.4.23", "inherits": "^2.0.4", "internal-slot": "^1.0.3", "ipaddr.js": "^1.9.1", "is-bigint": "^1.0.4", "is-boolean-object": "^1.1.2", "is-callable": "^1.2.4", "is-core-module": "^2.8.0", "is-date-object": "^1.0.5", "is-negative-zero": "^2.0.2", "is-number-object": "^1.0.6", "is-obj": "^1.0.1", "is-regex": "^1.1.4", "is-regexp": "^1.0.0", "is-shared-array-buffer": "^1.0.1", "is-string": "^1.0.7", "is-symbol": "^1.0.4", "is-weakref": "^1.0.2", "isarray": "^0.0.1", "json-lines": "^1.0.0", "json-schema-traverse": "^0.4.1", "jsonwebtoken": "^8.5.0", "jwa": "^1.4.1", "jws": "^3.2.2", "limes": "^2.0.0", "lodash": "^4.17.11", "lodash.includes": "^4.3.0", "lodash.isboolean": "^3.0.3", "lodash.isinteger": "^4.0.4", "lodash.isnumber": "^3.0.3", "lodash.isplainobject": "^4.0.6", "lodash.isstring": "^4.0.1", "lodash.once": "^4.1.1", "lusca": "^1.6.1", "media-typer": "^0.3.0", "merge-descriptors": "^1.0.1", "methods": "^1.1.2", "mime": "^1.4.1", "mime-db": "^1.51.0", "mime-types": "^2.1.34", "moment": "^2.22.2", "morgan": "^1.9.1", "ms": "^2.0.0", "nanoid": "^3.1.30", "negotiator": "^0.6.2", "nocache": "^2.0.0", "node-releases": "^2.0.1", "node-rsa": "^0.4.2", "node-statsd": "^0.1.1", "normalize-range": "^0.1.2", "object-assign": "^4.1.1", "object-inspect": "^1.12.0", "object-keys": "^1.1.1", "object.assign": "^4.1.2", "object.getownpropertydescriptors": "^2.1.3", "on-finished": "^2.3.0", "on-headers": "^1.0.2", "parseurl": "^1.3.3", "partof": "^1.0.0", "path-parse": "^1.0.7", "path-to-regexp": "^0.1.7", "picocolors": "^1.0.0", "postcss-value-parser": "^4.2.0", "processenv": "^1.1.0", "proxy-addr": "^2.0.7", "punycode": "^2.1.1", "qs": "^6.5.2", "range-parser": "^1.2.1", "raw-body": "^2.3.3", "readable-stream": "^1.1.14", "regenerator-runtime": "^0.12.1", "resolve": "^1.21.0", "retry": "^0.12.0", "rollup": "^2.63.0", "safe-buffer": "^5.1.2", "safer-buffer": "^2.1.2", "semver": "^5.7.1", "send": "^0.16.2", "serve-static": "^1.13.2", "setprototypeof": "^1.1.0", "sha-1": "^0.1.1", "side-channel": "^1.0.4", "source-map": "^0.6.1", "source-map-js": "^1.0.1", "source-map-resolve": "^0.6.0", "split2": "^3.0.0", "stack-trace": "^0.0.10", "statuses": "^1.4.0", "stethoskop": "^1.0.0", "string_decoder": "^0.10.31", "string.prototype.trimend": "^1.0.4", "string.prototype.trimstart": "^1.0.4", "stringify-object": "^3.3.0", "supports-color": "^5.5.0", "supports-preserve-symlinks-flag": "^1.0.0", "timer2": "^1.0.0", "tsscmp": "^1.0.6", "type-is": "^1.6.18", "unbox-primitive": "^1.0.1", "unpipe": "^1.0.0", "untildify": "^3.0.3", "uri-js": "^4.4.1", "util-deprecate": "^1.0.2", "util.promisify": "^1.0.0", "utils-merge": "^1.0.1", "uuid": "^3.3.2", "uuidv4": "^3.0.1", "varname": "^2.0.3", "vary": "^1.1.2", "which-boxed-primitive": "^1.0.2", "ws": "^6.2.0" }, "description": "" } { "name": "tailwind-css-part-7", "version": "1.0.0", "main": "index.js", "devDependencies": { "autoprefixer": "^10.4.2", "css": "^3.0.0", "postcss": "^8.4.5", "tailwind": "^4.0.0", "vite": "^2.7.10" }, "scripts": { "start": "vite" }, "keywords": [], "author": "", "license": "ISC", "dependencies": { "accepts": "^1.3.7", "ajv": "^6.10.0", "amqplib": "^0.5.2", "ansi-styles": "^3.2.1", "app-root-path": "^2.1.0", "array-flatten": "^1.1.1", "asn1": "^0.2.3", "async-limiter": "^1.0.1", "async-retry": "^1.2.3", "atob": "^2.1.2", "babel-runtime": "^6.26.0", "basic-auth": "^2.0.1", "bitsyntax": "^0.0.4", "bluebird": "^3.7.2", "body-parser": "^1.18.3", "browserslist": "^4.19.1", "buffer-equal-constant-time": "^1.0.1", "buffer-more-ints": "^0.0.2", "bytes": "^3.0.0", "call-bind": "^1.0.2", "caniuse-lite": "^1.0.30001296", "chalk": "^2.4.1", "color-convert": "^1.9.3", "color-name": "^1.1.3", "commands-events": "^1.0.4", "comparejs": "^1.0.0", "compressible": "^2.0.18", "compression": "^1.7.3", "content-disposition": "^0.5.2", "content-type": "^1.0.4", "cookie": "^0.3.1", "cookie-signature": "^1.0.6", "core-js": "^2.6.12", "core-util-is": "^1.0.3", "cors": "^2.8.5", "crypto2": "^2.0.0", "datasette": "^1.0.1", "debug": "^2.6.9", "decode-uri-component": "^0.2.0", "define-properties": "^1.1.3", "depd": "^1.1.2", "destroy": "^1.0.4", "draht": "^1.0.1", "ecdsa-sig-formatter": "^1.0.11", "ee-first": "^1.1.1", "electron-to-chromium": "^1.4.35", "encodeurl": "^1.0.2", "es-abstract": "^1.19.1", "es-to-primitive": "^1.2.1", "esbuild": "^0.13.15", "esbuild-windows-64": "^0.13.15", "escalade": "^3.1.1", "escape-html": "^1.0.3", "escape-string-regexp": "^1.0.5", "etag": "^1.8.1", "eventemitter2": "^5.0.1", "express": "^4.16.4", "fast-deep-equal": "^2.0.1", "fast-json-stable-stringify": "^2.1.0", "finalhandler": "^1.1.1", "find-root": "^1.1.0", "flaschenpost": "^5.0.49", "formats": "^1.0.0", "forwarded": "^0.2.0", "fraction.js": "^4.1.2", "fresh": "^0.5.2", "function-bind": "^1.1.1", "get-intrinsic": "^1.1.1", "get-own-enumerable-property-symbols": "^3.0.2", "get-symbol-description": "^1.0.0", "has": "^1.0.3", "has-bigints": "^1.0.1", "has-flag": "^3.0.0", "has-symbols": "^1.0.2", "has-tostringtag": "^1.0.0", "hase": "^2.0.0", "http-errors": "^1.6.3", "iconv-lite": "^0.4.23", "inherits": "^2.0.4", "internal-slot": "^1.0.3", "ipaddr.js": "^1.9.1", "is-bigint": "^1.0.4", "is-boolean-object": "^1.1.2", "is-callable": "^1.2.4", "is-core-module": "^2.8.0", "is-date-object": "^1.0.5", "is-negative-zero": "^2.0.2", "is-number-object": "^1.0.6", "is-obj": "^1.0.1", "is-regex": "^1.1.4", "is-regexp": "^1.0.0", "is-shared-array-buffer": "^1.0.1", "is-string": "^1.0.7", "is-symbol": "^1.0.4", "is-weakref": "^1.0.2", "isarray": "^0.0.1", "json-lines": "^1.0.0", "json-schema-traverse": "^0.4.1", "jsonwebtoken": "^8.5.0", "jwa": "^1.4.1", "jws": "^3.2.2", "limes": "^2.0.0", "lodash": "^4.17.11", "lodash.includes": "^4.3.0", "lodash.isboolean": "^3.0.3", "lodash.isinteger": "^4.0.4", "lodash.isnumber": "^3.0.3", "lodash.isplainobject": "^4.0.6", "lodash.isstring": "^4.0.1", "lodash.once": "^4.1.1", "lusca": "^1.6.1", "media-typer": "^0.3.0", "merge-descriptors": "^1.0.1", "methods": "^1.1.2", "mime": "^1.4.1", "mime-db": "^1.51.0", "mime-types": "^2.1.34", "moment": "^2.22.2", "morgan": "^1.9.1", "ms": "^2.0.0", "nanoid": "^3.1.30", "negotiator": "^0.6.2", "nocache": "^2.0.0", "node-releases": "^2.0.1", "node-rsa": "^0.4.2", "node-statsd": "^0.1.1", "normalize-range": "^0.1.2", "object-assign": "^4.1.1", "object-inspect": "^1.12.0", "object-keys": "^1.1.1", "object.assign": "^4.1.2", "object.getownpropertydescriptors": "^2.1.3", "on-finished": "^2.3.0", "on-headers": "^1.0.2", "parseurl": "^1.3.3", "partof": "^1.0.0", "path-parse": "^1.0.7", "path-to-regexp": "^0.1.7", "picocolors": "^1.0.0", "postcss-value-parser": "^4.2.0", "processenv": "^1.1.0", "proxy-addr": "^2.0.7", "punycode": "^2.1.1", "qs": "^6.5.2", "range-parser": "^1.2.1", "raw-body": "^2.3.3", "readable-stream": "^1.1.14", "regenerator-runtime": "^0.12.1", "resolve": "^1.21.0", "retry": "^0.12.0", "rollup": "^2.63.0", "safe-buffer": "^5.1.2", "safer-buffer": "^2.1.2", "semver": "^5.7.1", "send": "^0.16.2", "serve-static": "^1.13.2", "setprototypeof": "^1.1.0", "sha-1": "^0.1.1", "side-channel": "^1.0.4", "source-map": "^0.6.1", "source-map-js": "^1.0.1", "source-map-resolve": "^0.6.0", "split2": "^3.0.0", "stack-trace": "^0.0.10", "statuses": "^1.4.0", "stethoskop": "^1.0.0", "string_decoder": "^0.10.31", "string.prototype.trimend": "^1.0.4", "string.prototype.trimstart": "^1.0.4", "stringify-object": "^3.3.0", "supports-color": "^5.5.0", "supports-preserve-symlinks-flag": "^1.0.0", "timer2": "^1.0.0", "tsscmp": "^1.0.6", "type-is": "^1.6.18", "unbox-primitive": "^1.0.1", "unpipe": "^1.0.0", "untildify": "^3.0.3", "uri-js": "^4.4.1", "util-deprecate": "^1.0.2", "util.promisify": "^1.0.0", "utils-merge": "^1.0.1", "uuid": "^3.3.2", "uuidv4": "^3.0.1", "varname": "^2.0.3", "vary": "^1.1.2", "which-boxed-primitive": "^1.0.2", "ws": "^6.2.0" }, "description": "" }

It also happened to me while I was trying to install tailwindcss and I installed tailwind by mistake.当我尝试安装tailwindcss并且我错误地安装了tailwind时,它也发生在我身上。 Just uninstall it if that's also your case.如果这也是你的情况,只需卸载它。

Its not a breaking error, just means that some functionalities might not work as expected.它不是一个重大错误,只是意味着某些功能可能无法按预期工作。 As this npm WARN EBADENGINE required: { node: '>=0.8 <=9' } line shows, the required node version for this package to work as intended is between 0.8 and 9 but you have node 16.正如此npm WARN EBADENGINE required: { node: '>=0.8 <=9' }行所示,此 package 按预期工作所需的节点版本在 0.8 和 9 之间,但您有节点 16。

I faced with the same warning when I was try to install tailwind in my project:当我尝试在我的项目中安装tailwind时,我遇到了同样的警告:

npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@eslint/eslintrc@1.3.0',
npm WARN EBADENGINE   required: { node: '^12.22.0 || ^14.17.0 || >=16.0.0' },
npm WARN EBADENGINE   current: { node: 'v14.16.1', npm: '8.2.0' }
npm WARN EBADENGINE }

So, I upgraded node.js version to 14.17.0 , and warning gone.所以,我将node.js版本升级到14.17.0 ,警告消失了。 You can find release you need by this link - https://nodejs.org/en/download/releases/您可以通过此链接找到您需要的版本 - https://nodejs.org/en/download/releases/

Need to change the node version.需要更改节点版本。 you can use node version manager for that https://github.com/nvm-sh/nvm[enter link description here][1]您可以为该https 使用节点版本管理器://github.com/nvm-sh/nvm[在此处输入链接描述][1]

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM