报错警告npm ERR! code EINVALIDTAGNAME原因没有进行npm init便开始安装包。注意事项这里我们需要注意的是npm init和npm i并不相同,npm i 代表的是npm install表示安装,并不表示初始化,初始化需要我们npm init这个命令不能够简写。...
npm
ERR
!
code
EPERM
npm
ERR
! syscall open
npm
ERR
! path C:\Program Files\
node
js\
node
_cache\_cacache\tmp\9600794e
npm
ERR
!
err
no -4048
npm
ERR
!
Err
or: EPERM: operation not permitted, open 'C:\Program Files\
node
js\
node
_cache\_cacache\tmp\9600794e'
npm
ERR
! [Operational
Err
or: EPERM: operation no
npm
ERR
!
code
E
INVALID
TAGNAME
npm
ERR
!
Invalid
tag name "Vue-Q&A": Tags may not have any characters that en
code
URICompo
nent en
code
s.
About t...
安装vue-cli的前提是你已经安装了
npm
,安装
npm
你可以直接下载
node
的安装包进行安装。你可以在命令行工具里输入
npm
-v 检测你是否安装了
npm
和版本情况。出现版本号说明你已经安装了
npm
和
node
,如果该命令不可用,需要安装
node
软件包,根据你的系统版本选择下载安装就可以了。
一、安装vue-cli
在命令行工具输入:
npm
install vue-cli -g
-g:代表全局安装。用vue -V 来检查你安装版本号(-V,是大写的)
二、初始化项目
我们用vue init 命令来初始化项目:
vue init <template> <project-nam
整理了自己在安装过程中碰到的四种
npm
ERR
及解决方式
npm
ERR
! A complete log of this run can be found in:
npm
ERR
!
C:Users anyiAppDataRoaming pm-cache_logs?1-09-17T08_58_23_413Z-de
bug
.l
查看错误日志,错误日志就在上面展示的C:Users…这里
如果发现错误日志里有
err
mkdir
错误原因:权限不足
解决办法:关闭Vs
Code
并以管理员权限启动Vs
Code
即可
npm
ERR
!
code
E
INVALID
TAGNAME
npm
ERR
!
Invalid
tag name "create-react-app ": Tags may not have any characters that en
code
URIComponent en
code
s.
解决方式:
安装旧版对等依赖项
npm
install --legacy-peer-deps
npm
install .
整理了自己在安装过程中碰到的三种
npm
ERR
及解决方式
npm
ERR
! A complete log of this run can be found in:
npm
ERR
!
C:\Users\nanyi\AppData\Roaming\
npm
-cache_logs\2021-09-17T08_58_23_413Z-de
bug
.l
查看错误日志,错误日志就在上面展示的C:\Users…这里
如果发现错误日志里有
err
mkdir
错误原因:权限不足
解决办法:关闭Vs
Code
并以管理员权限启
24741
err
or
code
EPERM
24742
err
or syscall unlink
24743
err
or path E:\workspaces\multiplatform\
node
_modules\.staging\regexpp-c7c47c68\index.js.map
24744
err
or
err
no -4048
24745
err
or
Err
or: EPERM: operation not permitted, unlink 'E:\workspaces\multiplatform\
node
_modules\.staging\regexpp-c7c4
运行sudo
npm
install -g webpack@4.35.2 安装指定版本的webpack出现如下错误:
gyp
ERR
! configure
err
or
gyp
ERR
! stack
Err
or: EACCES: permission denied, mkdir ‘/Users/mac-pro/.nvm/versions/
node
/v10.16.0/lib/
node
_modules/webpack/
node
_modules/fsevents/build’
gyp
ERR
! System Darwin 19.3.0
gyp
ERR
! command “/Users/mac-pro/
npm
ERR
! Windows_NT 6.1.7601
npm
ERR
! argv "E:\\
node
\\\\
node
.exe" "E:\\
node
\\
node
_modules\\
npm
\\bin\\
npm
-cli.js" "install"
npm
ERR
!
node
v0.12.0
npm
ERR
!
npm
v2.5.1
npm
ERR
!
code
ECONNRESET