Giter VIP home page Giter VIP logo

node's Introduction

start over😄

node's People

Contributors

liuxilei avatar

Watchers

 avatar

node's Issues

yarn 安装报错解决

error info

error An unexpected error occurred: "C:\\Users\\z\\AppData\\Local\\Yarn\\Cache\\v4\\npm-jest-environment-jsdom-22.4.3-d67daa4155e33516aecdd35afd82d4abf0fa8a1e\\node_modules\\jest-environment-jsdom\\package.json: Unexpected end of JSON input".
info If you think this is a bug, please open a bug report with the information provided in "E:\\工作\\huozi-landing\\yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

solve method

yarn cache clean

nvm常见操作

// 安装node版本,比如安装10.18
nvm install 10.18 

// 查看已经安装的版本
nvm list 
nvm ls

// 使用某个版本
nvm use 10.18

// 删除某个版本
nvm uninstall 10.18

// 显示当前使用版本
nvm current

淘宝源设置

淘宝 npm地址: http://npm.taobao.org/

临时使用

$ npm --registry https://registry.npm.taobao.org install express

持久使用

$ npm config set registry https://registry.npm.taobao.org

配置后可通过下面方式来验证是否成功

$ npm config get registry

恢复官方地址

$ npm config set registry https://registry.npmjs.org

配置文件.npmrc,npm缓存和全局node包

快捷修改.npmrc文件

$ npm config edit

.npmrc配置文件位置

$ npm config list

查看; userconfig那一行

缓存目录

$ npm config get cache

全局包位置

$ npm config get prefix

查看全局安装了哪些包

$ npm list -g --depth 0
命令 解释
npm list 显示安装过的包
-g 全局
--depth 0 限制输出模块层级

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.