Whales_w 2023-05-19 22:28 采纳率: 33.3%
浏览 46
已结题

MAC M2芯片 跑vue2.0项目 install 报错

MAC M2芯片 跑vue2.0项目 install 报错
现在是 node14 版本


```shell

frontend % npm install
npm WARN deprecated tar@2.2.2: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.
npm WARN lifecycle The node binary used for scripts is /opt/homebrew/opt/node@14/bin/node but npm is using /opt/homebrew/Cellar/node@14/14.21.3/libexec/node itself. Use the `--scripts-prepend-node-path` option to include the path for the node binary npm was executed with.

> node-sass@4.14.1 install /Users/whales/project/ibuild-cscec82-hr/frontend/node_modules/node-sass
> node scripts/install.js

Downloading binary from https://npm.taobao.org/mirrors/node-sass/v4.14.1/darwin-arm64-83_binding.node
Cannot download "https://npm.taobao.org/mirrors/node-sass/v4.14.1/darwin-arm64-83_binding.node": 

HTTP error 404 Not Found

Hint: If github.com is not accessible in your location
      try setting a proxy via HTTP_PROXY, e.g. 

      export HTTP_PROXY=http://example.com:1234

or configure npm proxy via

      npm config set proxy http://example.com:8080

> node-sass@4.14.1 postinstall /Users/whales/project/ibuild-cscec82-hr/frontend/node_modules/node-sass
> node scripts/build.js

Building: /opt/homebrew/Cellar/node@14/14.21.3/libexec/node /Users/whales/project/ibuild-cscec82-hr/frontend/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
gyp info it worked if it ends with ok
gyp verb cli [
gyp verb cli   '/opt/homebrew/Cellar/node@14/14.21.3/libexec/node',
gyp verb cli   '/Users/whales/project/ibuild-cscec82-hr/frontend/node_modules/node-gyp/bin/node-gyp.js',
gyp verb cli   'rebuild',
gyp verb cli   '--verbose',
gyp verb cli   '--libsass_ext=',
gyp verb cli   '--libsass_cflags=',
gyp verb cli   '--libsass_ldflags=',
gyp verb cli   '--libsass_library='
gyp verb cli ]
gyp info using node-gyp@3.8.0
gyp info using node@14.21.3 | darwin | arm64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "python2" in the PATH
gyp verb `which` failed Error: not found: python2
gyp verb `which` failed     at getNotFoundError (/Users/whales/project/ibuild-cscec82-hr/frontend/node_modules/which/which.js:13:12)
gyp verb `which` failed     at F (/Users/whales/project/ibuild-cscec82-hr/frontend/node_modules/which/which.js:68:19)
gyp verb `which` failed     at E (/Users/whales/project/ibuild-cscec82-hr/frontend/node_modules/which/which.js:80:29)
gyp verb `which` failed     at /Users/whales/project/ibuild-cscec82-hr/frontend/node_modules/which/which.js:89:16
gyp verb `which` failed     at /Users/whales/project/ibuild-cscec82-hr/frontend/node_modules/isexe/index.js:42:5
gyp verb `which` failed     at /Users/whales/project/ibuild-cscec82-hr/frontend/node_modules/isexe/mode.js:8:5
gyp verb `which` failed     at FSReqCallback.oncomplete (fs.js:192:21)
gyp verb `which` failed  python2 Error: not found: python2
gyp verb `which` failed     at getNotFoundError (/Users/whales/project/ibuild-cscec82-hr/frontend/node_modules/which/which.js:13:12)
gyp verb `which` failed     at F (/Users/whales/project/ibuild-cscec82-hr/frontend/node_modules/which/which.js:68:19)
gyp verb `which` failed     at E (/Users/whales/project/ibuild-cscec82-hr/frontend/node_modules/which/which.js:80:29)
gyp verb `which` failed     at /Users/whales/project/ibuild-cscec82-hr/frontend/node_modules/which/which.js:89:16
gyp verb `which` failed     at /Users/whales/project/ibuild-cscec82-hr/frontend/node_modules/isexe/index.js:42:5
gyp verb `which` failed     at /Users/whales/project/ibuild-cscec82-hr/frontend/node_modules/isexe/mode.js:8:5
gyp verb `which` failed     at FSReqCallback.oncomplete (fs.js:192:21) {
gyp verb `which` failed   code: 'ENOENT'
gyp verb `which` failed }
gyp verb check python checking for Python executable "python" in the PATH
gyp verb `which` succeeded python /Users/whales/miniconda3/bin/python
gyp ERR! configure error 
gyp ERR! stack Error: Command failed: /Users/whales/miniconda3/bin/python -c import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack   File "<string>", line 1
gyp ERR! stack     import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
gyp ERR! stack SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
gyp ERR! stack 
gyp ERR! stack     at ChildProcess.exithandler (child_process.js:383:12)
gyp ERR! stack     at ChildProcess.emit (events.js:400:28)
gyp ERR! stack     at maybeClose (internal/child_process.js:1088:16)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:296:5)
gyp ERR! System Darwin 22.3.0
gyp ERR! command "/opt/homebrew/Cellar/node@14/14.21.3/libexec/node" "/Users/whales/project/ibuild-cscec82-hr/frontend/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /Users/whales/project/ibuild-cscec82-hr/frontend/node_modules/node-sass
gyp ERR! node -v v14.21.3
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 
Build failed with error code: 1
npm WARN webpack-require-from@1.8.6 requires a peer of tapable@^2.2.0 but none is installed. You must install peer dependencies yourself.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass@4.14.1 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the node-sass@4.14.1 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/whales/.npm/_logs/2023-05-19T14_25_24_434Z-debug.log

```

  • 写回答

2条回答 默认 最新

  • 山与路 2023-05-20 13:03
    关注

    node-sass不支持m2型片,所以你只能将node-sass改成sass就行,然后将/deep/改成::v-deep就行其他语法基本上是一样的

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

问题事件

  • 系统已结题 5月28日
  • 已采纳回答 5月20日
  • 创建了问题 5月19日

悬赏问题

  • ¥15 微信小程序协议怎么写
  • ¥15 c语言怎么用printf(“\b \b”)与getch()实现黑框里写入与删除?
  • ¥20 怎么用dlib库的算法识别小麦病虫害
  • ¥15 华为ensp模拟器中S5700交换机在配置过程中老是反复重启
  • ¥15 java写代码遇到问题,求帮助
  • ¥15 uniapp uview http 如何实现统一的请求异常信息提示?
  • ¥15 有了解d3和topogram.js库的吗?有偿请教
  • ¥100 任意维数的K均值聚类
  • ¥15 stamps做sbas-insar,时序沉降图怎么画
  • ¥15 买了个传感器,根据商家发的代码和步骤使用但是代码报错了不会改,有没有人可以看看