说到底还是NODE
版本的问题,装 x86版就没问题了,快的一批
前端it人,基本都用 NVM
,具体可参考: https://github.com/nvm-sh/nvm
使用nvm
重新安装node,如果已经安装,请先uninstall
# Check what version you're running:
$ node --version
v14.15.4
# Check architecture of the `node` binary:
$ node -p process.arch
arm64
# This confirms that the arch is for the M1 chip, which is causing the problems.
# So we need to uninstall it.
# We can't uninstall the version we are currently using, so switch to another version:
$ nvm install v12.20.1
# Now uninstall the version we want to replace:
$ nvm uninstall v14.15.4
# Launch a new zsh process under the 64-bit X86 architecture:
$ arch -x86_64 zsh
# Install node using nvm. This should download the precompiled x64 binary:
$ nvm install v14.15.4
# Now check that the architecture is correct:
$ node -p process.arch
x64
# It is now safe to return to the arm64 zsh process:
$ exit
# We're back to a native shell:
$ arch
arm64
# And the new version is now available to use:
$ nvm use v14.15.4
Now using node v14.15.4 (npm v6.14.10)
公司新入手的Macbook m1最新款,使用NPM RUN DEV,你都可以去喝杯咖啡再回来,再看还在 build,怎么解决?
如何在VUE项目中添加stylelint,检查css,scss,less的语法问题,保证团队代码的规范统一
默认情况下,webpack-dev-server只可使用localhost或127.0.0.1访问,用局域网IP访问不了
mvvm项目总会有一些静态文件,如静态合同、协议等等,如何通过webpack来原样复制?
webpack最小化打包lodash插件,如果全量打包的话,lodash会非常大
vue2.0 项目,利用webpack搭建mock api服务,用于本地调试数据
webpack打包,报"WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB)",记录一下
webpack 是一个现代 JavaScript 应用程序的静态模块打包器(static module bundler)。在 webpack 处理应用程序时,它会在内部创建一个依赖图(dependency graph),用于映射到项目需要的每个模块,然后将所有这些依赖生成到一个或多个bundle