npm 初始化 vscode 终端中的问题

npm 初始化 vscode 终端中的问题

**

代码一:

.PS C:\Users\liuxuan\Desktop\node.day04\10文件> npm i jquery
npm ERR! path C:\Users\liuxuan\Des``ktop\node.day04\09-lyb2.0\http:\registry.npm.taobao.org\jquery\download\jquery-3.2.0.tgz
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall stat
npm ERR! enoent ENOENT: no such file or directory, stat ‘C:\Users\liuxuan\Desktop\node.day04\09-lyb2.0\http:\registry.npm.taobao.org\jquery\download\jquery-3.2.0.tgz’
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\liuxuan\AppData\Roaming\npm-cache_logs\2019-06-15T01_45_13_650Z-debug.log

若在vscode中有上述问题,就采用如下步骤解决

PS C:\Users\liuxuan\Desktop\node.day04\10文件> npm init
会出现如下代码:

**’

代码二:

**```
This utility will walk you through creating a package.json file.
It only covers the most common items, and tries to guess sensible defaults.

See npm help json for definitive documentation on these fields
and exactly what they do.

Use npm install <pkg> afterwards to install a package and
save it as a dependency in the package.json file.

Press ^C at any time to quit.
package name: (10文件) lala
version: (1.0.0)
description:
entry point: (01.js)
test command:
git repository:
keywords:
author:
license: (ISC)
About to write to C:\Users\liuxuan\Desktop\node.day04\10文件\package.json:

**每一项默认值,按enter即可**


**

## 代码三

**
**Is this OK? (yes)   输入 yes**

***

## **代码四:**

***PS C:\Users\liuxuan\Desktop\node.day04\10文件> npm i jquery
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN lala@1.0.0 No description
npm WARN lala@1.0.0 No repository field.

+ jquery@3.4.1
added 1 package from 1 contributor and audited 1 package in 1.845s
found 0 vulnerabilities

PS C:\Users\liuxuan\Desktop\node.day04\10文件>
**完成**



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值