npx出错

2018-09-17  本文已影响0人  索伯列夫

今天在上课的过程中需要parcel.js,环境一直配置不好。
过程如下:
1.创建环境目录,安装parcel。

npm init -y 
npm install --save-dev parcel-bundler

这两步没有什么问题,就是需要注意,安装目录的正确;

2.新建文件(省略)
3.运行

npx parcel index.html --no-cache

这一步,先提示bash没有操作权限,使用sudo后又提示找不到npx;
解决方法:

4.构建

npx parcel build index.html --no-cache
上一篇 下一篇

猜你喜欢

热点阅读