使用yarn将EmberJS项目升级到Node 16会导致node-sass冲突,怎么修?

zpjtge22  于 2023-06-29  发布在  Yarn
关注(0)|答案(1)|浏览(172)

我正在尝试使用yarn将我的emberJS项目升级到Node 16环境。
package.json

{

  "devDependencies": {
    "@babel/core": "^7.22.1",
    "@babel/plugin-proposal-object-rest-spread": "^7.17.3",
    "@babel/plugin-transform-block-scoping": "^7.21.0",
    "@ember/jquery": "^2.0.0",
    "@ember/optional-features": "^2.0.0",
    "@ember/render-modifiers": "^2.0.5",
    "@glimmer/component": "^1.1.2",
    "@glimmer/tracking": "^1.1.2",
    "@open-event/theme": "^0.2.2",
    "@sentry/browser": "^6.19.7",
    "@sentry/integrations": "^6.19.7",
    "@sentry/tracing": "^6.19.7",
    "@types/ember": "^4.0.0",
    "@types/ember-data": "^3.16.15",
    "@types/ember-data__model": "^3.16.1",
    "@types/ember-qunit": "^3.4.15",
    "@types/ember__test-helpers": "^2.6.1",
    "@types/lodash-es": "^4.17.6",
    "@types/moment": "^2.13.0",
    "@types/qunit": "^2.19.5",
    "@types/rsvp": "^4.0.4",
    "@types/url-parse": "^1.4.8",
    "@typescript-eslint/eslint-plugin": "^5.23.0",
    "@typescript-eslint/parser": "^5.59.8",
    "async": "^3.2.3",
    "babel-eslint": "^10.1.0",
    "broccoli-asset-rev": "^3.0.0",
    "broccoli-persistent-filter": "^3.1.3",
    "croppie": "^2.6.5",
    "css-loader": "^5.2.7",
    "dompurify": "^3.0.3",
    "ember-ajax": "5.1.2",
    "ember-auto-import": "^1.12.2",
    "ember-classic-decorator": "^3.0.0",
    "ember-cli": "~4.12.1",
    "ember-cli-accounting": "^2.1.0",
    "ember-cli-app-version": "^5.0.0",
    "ember-cli-autoprefixer": "2.0.0",
    "ember-cli-babel": "^7.26.11",
    "ember-cli-cjs-transform": "^2.0.0",
    "ember-cli-clipboard": "^0.16.0",
    "ember-cli-code-coverage": "^2.0.0",
    "ember-cli-dependency-checker": "^3.3.1",
    "ember-cli-deploy": "^1.0.0",
    "ember-cli-deploy-build": "^2.0.0",
    "ember-cli-deploy-git": "^1.3.4",
    "ember-cli-deploy-html-manifest": "0.0.6",
    "ember-cli-deploy-revision-data": "^2.0.0",
    "ember-cli-deprecation-workflow": "^2.1.0",
    "ember-cli-document-title-northm": "^1.0.3",
    "ember-cli-dotenv": "^3.1.0",
    "ember-cli-fastboot": "^4.1.1",
    "ember-cli-flash": "^2.2.0",
    "ember-cli-head": "^2.0.0",
    "ember-cli-html-minifier": "^1.1.0",
    "ember-cli-htmlbars": "^6.0.1",
    "ember-cli-ifa": "^0.10.0",
    "ember-cli-inject-live-reload": "^2.1.0",
    "ember-cli-moment-shim": "^3.7.1",
    "ember-cli-nouislider": "^1.2.1",
    "ember-cli-pace": "devotox/ember-cli-pace#master",
    "ember-cli-qunit": "^4.4.0",
    "ember-cli-sass": "^11.0.1",
    "ember-cli-scss-lint": "^2.4.1",
    "ember-cli-shims": "^1.2.0",
    "ember-cli-string-helpers": "^6.1.0",
    "ember-cli-stripe": "^3.0.0",
    "ember-cli-typescript": "^5.2.1",
    "ember-cli-typescript-blueprints": "^3.0.0",
    "ember-cli-uglify": "^3.0.0",
    "ember-composable-helpers": "^5.0.0",
    "ember-config-service": "^1.0.0",
    "ember-cookies": "^0.5.2",
    "ember-data": "3.14.1",
    "ember-data-has-many-query": "^0.3.1",
    "ember-data-storefront": "^0.18.1",
    "ember-decorators": "^6.1.1",
    "ember-drag-drop": "^0.8.2",
    "ember-exam": "^6.1.0",
    "ember-export-application-global": "^2.0.1",
    "ember-fetch": "8.1.1",
    "ember-fullcalendar": "^1.8.0",
    "ember-h-captcha": "^2.5.1",
    "ember-href-to": "5.0.0",
    "ember-infinity": "^2.3.0",
    "ember-l10n": "^4.3.1",
    "ember-leaflet": "^5.0.1",
    "ember-link-action": "2.0.4",
    "ember-load-initializers": "^2.1.2",
    "ember-math-helpers": "^3.0.0",
    "ember-maybe-import-regenerator": "^1.0.0",
    "ember-metrics": "^1.5.0",
    "ember-moment": "^8.0.2",
    "ember-notify": "^6.0.3",
    "ember-power-select": "^5.0.4",
    "ember-print-this": "^2.0.0",
    "ember-qunit": "^4.6.0",
    "ember-resolver": "^8.0.3",
    "ember-route-action-helper": "^2.0.8",
    "ember-router-scroll": "^3.3.7",
    "ember-simple-auth": "^4.2.2",
    "ember-simple-auth-token": "^5.3.0",
    "ember-source": "3.20.3",
    "ember-table": "^2.2.3",
    "ember-template-lint": "^2.21.0",
    "ember-truth-helpers": "^3.1.1",
    "ember-uuid": "^2.1.0",
    "eslint": "^7.32.0",
    "eslint-plugin-ember": "^10.6.1",
    "eslint-plugin-ember-suave": "^2.0.1",
    "eslint-plugin-node": "^11.1.0",
    "fastboot-app-server": "^4.1.1",
    "google-material-color": "^1.3.1",
    "http-status": "^1.6.2",
    "leaflet": "^1.8.0",
    "loader.js": "^4.7.0",
    "lodash-es": "^4.17.21",
    "mini-css-extract-plugin": "^2.7.6",
    "moment-timezone": "^0.5.31",
    "npm-run-all": "^4.1.5",
    "object-to-formdata": "^4.5.1",
    "paypal-checkout": "^4.0.338",
    "pre-commit": "^1.2.2",
    "query-string": "^7.1.1",
    "qunit-dom": "^2.0.0",
    "sass": "^1.62.1",
    "semantic-ui-calendar": "^0.0.8",
    "semantic-ui-ember": "3.0.5",
    "string_decoder": "^1.3.0",
    "style-loader": "^2.0.0",
    "tinyColorPicker": "https://github.com/PitPik/tinyColorPicker#1.1.1",
    "torii": "^0.10.1",
    "typescript": "^5.0.4",
    "url-parse": "^1.5.10",
    "webpack-bundle-analyzer": "^4.5.0",
    "wysihtml": "^0.5.5",
    "xgettext-template": "^4.1.2"
  },
  "engines": {
    "node": ">= 12.x <17",
    "yarn": ">= 1.2.0"
  },
  "private": true,
  "dependencies": {
    "@stripe/stripe-js": "^1.53.0",
    "ua-parser-js": "^1.0.35"
  },
  "ember": {
    "edition": "octane"
  },
  "ember-addon": {
    "paths": [
      "lib/cache-updater",
      "lib/start-title"
    ]
  },
  "fastbootDependencies": [
    "crypto",
    "node-fetch",
    "ua-parser-js"
  ]
}

我运行下面的命令切换到节点16

nvm use 16

然后运行以下命令将所有依赖项升级到节点16

yarn upgrade

结果如下:
尝试删除node-sass然后升级,但问题仍然存在。

mnemlml8

mnemlml81#

请尝试npm rebuild node-sass --force this comand rebuild your node-sass.
node-sass是一个允许你将Sass文件编译成CSS的模块。
如果不起作用,我认为你可以尝试删除你的node_modules并运行yarn install

相关问题