윈도 우즈 에 Vue CLI 를 설치 한 구덩이

5261 단어 자바 scriptvuenpm
공식 튜 토리 얼 설치 명령:
npm install -g @vue/cli
cmd 에서 실 행 된 오 류 는 다음 과 같다.
C:\Users\admin>npm install -g @vue/cli
npm ERR! Unexpected end of JSON input while parsing near '...0.3","mocha":"2.2.5
",'

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\admin\AppData\Roaming
pm-cache\_logs\2019-08-06T08_46_25_ 849Z-debug.log
npm ERR! Unexpected end of JSON input while parsing near

검색 한 후 대부분의 해결 방안:
npm cache clean --force
cmd 에서 실 행 된 오 류 는 다음 과 같다.
C:\Users\admin>npm install -g @vue/cli
npm WARN tarball tarball data for typescript@^3.4.5 (sha512-ACzBtm/PhXBDId6a6sDJ
froT2pOWt/oOnk4/dElG5G33ZL776N3Y6/6bKZJBFpd+b05F3Ct9qDjMeJmRWtE2/g==) seems to b
e corrupted. Trying one more time.
npm ERR! path C:\Users\admin\AppData\Roaming
pm
ode_modules\.staging\typescrip t-0cbfd754\lib\tsserver.js npm ERR! code EPERM npm ERR! errno -4048 npm ERR! syscall unlink npm ERR! Error: EPERM: operation not permitted, unlink 'C:\Users\admin\AppData\R oaming
pm
ode_modules\.staging\typescript-0cbfd754\lib\tsserver.js' npm ERR! { [Error: EPERM: operation not permitted, unlink 'C:\Users\admin\AppDa ta\Roaming
pm
ode_modules\.staging\typescript-0cbfd754\lib\tsserver.js'] npm ERR! cause: npm ERR! { Error: EPERM: operation not permitted, unlink 'C:\Users\admin\AppD ata\Roaming
pm
ode_modules\.staging\typescript-0cbfd754\lib\tsserver.js' npm ERR! errno: -4048, npm ERR! code: 'EPERM', npm ERR! syscall: 'unlink', npm ERR! path: npm ERR! 'C:\\Users\\admin\\AppData\\Roaming\
pm\
ode_modules\\.staging\ \typescript-0cbfd754\\lib\\tsserver.js' }, npm ERR! stack: npm ERR! 'Error: EPERM: operation not permitted, unlink \'C:\\Users\\admin\\A ppData\\Roaming\
pm\
ode_modules\\.staging\\typescript-0cbfd754\\lib\\tsserver .js\'', npm ERR! errno: -4048, npm ERR! code: 'EPERM', npm ERR! syscall: 'unlink', npm ERR! path: npm ERR! 'C:\\Users\\admin\\AppData\\Roaming\
pm\
ode_modules\\.staging\\ty pescript-0cbfd754\\lib\\tsserver.js', npm ERR! parent: '@vue/cli' } npm ERR! npm ERR! The operation was rejected by your operating system. npm ERR! It's possible that the file was already in use (by a text editor or ant ivirus), npm ERR! or that you lack permissions to access it. npm ERR! npm ERR! If you believe this might be a permissions issue, please double-check t he npm ERR! permissions of the file and its containing directories, or try running npm ERR! the command again as root/Administrator (though this is not recommended ). (Y/N)? y
npm ERR! Error: EPERM: operation not permitted, unlink

권한 이 없 기 때문에 관리자 권한 으로 실행 cmd 하고 설치 명령 을 실행 합 니 다. 성공:
C:\Windows\system32>npm install -g @vue/cli
C:\Users\admin\AppData\Roaming
pm\vue -> C:\Users\admin\AppData\Roaming
pm
od e_modules\@vue\cli\bin\vue.js > [email protected] postinstall C:\Users\admin\AppData\Roaming
pm
ode_modules\@vue \cli
ode_modules\core-js > node scripts/postinstall || echo "ignore" Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfill ing JavaScript standard library! The project needs your help! Please consider supporting of core-js on Open Colle ctive or Patreon: > https://opencollective.com/core-js > https://www.patreon.com/zloirock Also, the author of core-js ( https://github.com/zloirock ) is looking for a goo d job -) > [email protected] postinstall C:\Users\admin\AppData\Roaming
pm
ode_modules \@vue\cli
ode_modules\core-js-pure > node scripts/postinstall || echo "ignore" Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfill ing JavaScript standard library! The project needs your help! Please consider supporting of core-js on Open Colle ctive or Patreon: > https://opencollective.com/core-js > https://www.patreon.com/zloirock Also, the author of core-js ( https://github.com/zloirock ) is looking for a goo d job -) > [email protected] postinstall C:\Users\admin\AppData\Roaming
pm
ode_modules\@ vue\cli
ode_modules\protobufjs > node scripts/postinstall > [email protected] postinstall C:\Users\admin\AppData\Roaming
pm
ode_modules\@vu e\cli
ode_modules
odemon > node bin/postinstall || exit 0 Love nodemon? You can now support the project via the open collective: > https://opencollective.com/nodemon/donate npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\@vu e\cli
ode_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@ 1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"} ) + @vue/[email protected] added 849 packages from 576 contributors in 393.952s

인터넷 기타 솔 루 션: C: \ Users \ \ 사용자 이름. npmrc 를 삭제 하고 스스로 시도 할 수 있 습 니 다.

좋은 웹페이지 즐겨찾기