bat*_*tch 5 node.js typescript vue.js nuxt.js apple-m1
我正在我的新 M1 芯片机器(Mac)上为 Nuxt 项目开发环境。\n问题是 Nuxt 项目的构建速度太慢。
\n我将nodenv安装到我的项目中,并使用v12.9.0。在项目文件夹中,使用的包 maneger(npm / yarn) 位于/Users/username/.nodenv/shims/node.
我运行yarn install和后yarn dev,编译(客户端加服务器)大约需要 2 小时。
如果我在我的英特尔机器(Mac)上运行yarn dev,构建只需要几秒钟。
如果您对隔离问题的步骤有任何想法,请教我。\n谢谢,
\n\xe3\x80\x90我的方法\xe3\x80\x91
\nnode_modules并重新安装它们yarn install。\xe3\x80\x90环境\xe3\x80\x91
\n\xe3\x80\x90modules\xe3\x80\x91\nmy package.json 是这样的,
\n"dependencies": {\n "@nuxt/typescript-runtime": "^0.4.0",\n "@nuxtjs/axios": "^5.9.5",\n "@nuxtjs/dotenv": "^1.4.1",\n "@nuxtjs/google-gtag": "^1.0.4",\n "@nuxtjs/gtm": "^2.4.0",\n "@nuxtjs/pwa": "^3.0.0-0",\n "@nuxtjs/style-resources": "^1.0.0",\n "@types/highlight.js": "^9.12.3",\n "@types/quill": "^2.0.3",\n "autolinker": "^3.13.0",\n "blob-util": "^2.0.2",\n "camelcase-keys": "^6.2.1",\n "cross-env": "^7.0.2",\n "crypto-js": "^4.0.0",\n "express": "^4.17.1",\n "highlight.js": "^9.18.1",\n "js-cookie": "^2.2.1",\n "npm-check-updates": "^4.0.6",\n "nuxt": "^2.12.1",\n "nuxt-basic-auth-module": "^1.3.2",\n "nuxt-clipboard2": "^0.2.1",\n "parchment": "^2.0.0-dev.2",\n "pm2": "^4.2.3",\n "quill-image-drop-and-paste": "^1.0.4",\n "sanitize-html": "^1.22.1",\n "snakecase-keys": "^3.1.2",\n "vue-infinite-loading": "^2.4.5",\n "vue-property-decorator": "^8.4.1",\n "vue-sanitize": "^0.2.0",\n "vue-scrollto": "^2.18.1",\n "vue-stripe-elements-plus": "^0.3.2",\n "vue-toc": "0.0.1",\n "vue-tweet-embed": "^2.4.0",\n "vue2-editor": "^2.10.2",\n "vuex-persistedstate": "^3.0.0"\n },\n "devDependencies": {\n "@nuxt/typescript-build": "^0.6.0",\n "@nuxtjs/eslint-config": "^5.0.0",\n "@nuxtjs/eslint-config-typescript": "^5.0.0",\n "@nuxtjs/eslint-module": "^3.0.1",\n "@nuxtjs/moment": "^1.6.0",\n "@nuxtjs/vuetify": "^1.11.0",\n "@types/jest": "^25.1.4",\n "@typescript-eslint/eslint-plugin": "^2.25.0",\n "@typescript-eslint/parser": "^2.25.0",\n "@vue/test-utils": "^1.0.0-beta.29",\n "babel-core": "^7.0.0-bridge.0",\n "babel-eslint": "^10.1.0",\n "babel-jest": "^25.2.1",\n "eslint": "^7.14.0",\n "eslint-config-prettier": "^6.15.0",\n "eslint-plugin-nuxt": "^2.0.0",\n "eslint-plugin-prettier": "^3.1.4",\n "jest": "^25.2.1",\n "node-sass": "^4.13.1",\n "nodemon": "^2.0.2",\n "prettier": "^2.2.0",\n "sass-loader": "^8.0.2",\n "ts-jest": "^25.2.1",\n "vue-jest": "^3.0.5"\n }\nRun Code Online (Sandbox Code Playgroud)\n
我自己解决了这个问题。
16.0.0node-sass,请将其删除。sass并node-loader@7.1.0yarn install&yarn dev这对我来说非常有效。
| 归档时间: |
|
| 查看次数: |
3472 次 |
| 最近记录: |