我在VS-Code中输入了命令npm install -D tailwind css postcss autoprefixer vite
。
我的环境是:
- NPM版本:
8.1.2
- Node.js版本:
16.13.1
导致以下警告:
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 }
我的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": "" }
5条答案
按热度按时间mitkmikd1#
这不是一个破坏性错误,只是意味着一些功能可能无法正常工作。如
npm WARN EBADENGINE required: { node: '>=0.8 <=9' }
行所示,此包正常工作所需的节点版本介于0.8和9之间,但您拥有的是节点16。46qrfjad2#
我在安装
tailwindcss
的时候也遇到过这种情况,我错安装了tailwind
。如果你也是这种情况,就卸载它吧。dfddblmv3#
当我尝试在我的项目中安装
tailwind
时,我遇到了同样的警告:所以,我升级了
node.js
版本到14.17.0
,警告消失了。你可以通过这个链接找到你需要的版本-https://nodejs.org/en/download/releases/6rqinv9w4#
需要更改节点版本。您可以使用该https://github.com/nvm-sh/nvm的节点版本管理器
rsl1atfo5#
您可以删除node_modules并移除package-lock.json,然后尝试重新安装。