当前位置: 首页 > news >正文

安徽专业网站建设检修html5模板免费下载

安徽专业网站建设检修,html5模板免费下载,wordpress 婚恋,wordpress 页面下文章在使用vue的开发环境过程中#xff0c;总会遇到这样哪样的安装或者打包错误#xff0c; vue运行或打包常见错误如下#xff1a; 1. npm install时 node-sass npm ERR command failed #xff08;可能是node.js的版本和node-sass的版本不符#xff0c;就是卸掉原来的node.…在使用vue的开发环境过程中总会遇到这样哪样的安装或者打包错误 vue运行或打包常见错误如下 1. npm install时 node-sass npm ERR command failed 可能是node.js的版本和node-sass的版本不符就是卸掉原来的node.js下载一个符合node-sass版本的node.js 2. npm run build无法打包的可能原因 npm ERR! missing script: build  package.json中scripts参数为build:prod: vue-cli-service build所以换命令打包npm rum build:prod 3. npm WARN npm Supported releases of Node.js are the latest release of 6, 8, 9, 10, 11.  (据自己的node版本来更新npm 版本npm -g install npm6.14.8 ,如果仍然报错依旧显示npm 不支持这个版本 这说明npm存在旧的npm缓存还是旧的npm 环境 此时需要到C:\Users\administrator\AppData\Roaming 根目录下删除npm和npm-cache两个文件夹) 4. npm install时 node-sass npm ERR command failed问题解决 卸载当前版本的node-sass和sass-loader,因为版本和当前的不兼容,安装对应版本的包即可。 5. Syntax Error: Error: PostCSS received undefined instead of CSS string 卸载当前版本的node-sass和sass-loader,因为版本和当前的不兼容,安装对应版本的包即可。 6. npm ERR! gyp ERR! find Python Python is not set from command line or npm con  7. npm ERR! gyp verb check python checking for Python executable python2 in the PATH  通过npm指令安装对应版本的python建议方式 npm install --global --production windows-build-tools 8. npm install时报错 gyp ERR! stack Error: Cant find Python executable 2.7  通过npm指令安装对应版本的python建议方式 npm install --global --production windows-build-tools 9.使用npm下载直接卡死超简单解决办法(放大缩小cmd命令窗口或者ctrlc可中断错误继续重试脚本) 在install这些框架时往往还需要安装其要求的依赖或是相关的编译环境下面将记录描述下python和node-sass的安装办法 (一) python安装 1.官网下载安装包传统安装然后配置相关环境变量 2.在安装了node但是为安装python的前提下通过npm指令安装对应版本的python建议方式 npm install --global --production windows-build-tools   (会自动安装对应python) 对于非python玩家建议方式二安装python环境该方式node会为你匹配对应node版本的python这样将避免后续使用中的版本过高或过低造成的编译失败问题比如node16在python2.x下编译会抛出version问题。 (二) node-sass安装 node-sass的安装有很多方式在此我仅介绍一种多次尝试这种方式最方便稳定适合node8.x以上版本现在大多数是node-v14以上的版本了直接执行以下安装命令吧 npm install --save node-sass --registryhttps://registry.npm.taobao.org --disturlhttps://npm.taobao.org/dist --sass-binary-sitehttps://npm.taobao.org/mirrors/node-sass/  –registryhttps://registry.npm.taobao.org 淘宝npm包镜像 –disturlhttps://npm.taobao.org/dist   淘宝node源码镜像一些二进制包编译时用 –sass-binary-sitehttp://npm.taobao.org/mirrors/node-sass  这个才是node-sass镜像   另外一种设置全局镜像源命令适合node 8.x 以下版本npm config set sass_binary_site https://npm.taobao.org/mirrors/node-sass/ npm config set registryhttps://registry.npm.taobao.org     如果嫌国外npm不好用可以尝试安装cnpm,完全等同于npm,  1.先全局安装cnpm     npm install -g cnpm --registryhttps://registry.npm.taobao.org 2.利用淘宝的npm镜像安装node-sass    cnpm install node-sass CNPM 是中国 npm 镜像的客户端支持所有 npm命令。 安装nodejs环境自带安装npm --------------------------------------------------------------------- 在NodeJS官网https://nodejs.org/下载安装合适的版本 https://nodejs.org/dist/v14.17.1/  node-v14.17.1 对应npm版本 6.14.13(依赖python2.7x)  https://nodejs.org/dist/v16.9.1/   node-v16.9.1 对应npm版本 8.19.2(依赖python3.8x) https://nodejs.org/dist/v18.17.1/  太新了不推荐  npm常见命令 ---------------------------------------------------------------------npm insall  安装失败的话删除目录下的node_modules文件夹 npm run dev   npm rum serve npm uninstall -g vue/cli  安装打包命令cli npm install -g vue/cli npm list webpack  查看包  npm cache clean --force  清理缓存  npm start npm run dev只是用来调试的开发就够了 补充说明 有一个相似的命令就是下面这个也是用来搭建环境的但有一点小区别具体情况具体额分析。 npm run build你想用提交小程序版本的时候运行然后代码都会被压缩提交的时候就更小了。   gyp ERR stack Error: Can ‘t find Python executable python2.7, you can set the PYTHON env variable. 在公司部署前端项目的时候,npm install 安装依赖的时候出现了问题发现是node-sass这个包下载失败 在这里插入图片描述在这里插入图片描述 我在想是不是没安装什么呢因为我是面向百度编程的所以就百度了一下发现需要安装编译环境 npm install -g node-gyp  npm install --global --production windows-build-tools     (这条命令需管理员运行) 然后卸载安装失败的包 npm uninstall node-sass 然后重新安装 npm install node-sass 最后npm install , npm run dev 直接运行就好了。 If you have multiple Python versions installed, you can identify which Python version node-gyp uses by setting the --python variable: node-gyp --python /path/to/python2.7 If node-gyp is called by way of npm and you have multiple versions of Python installed, then you can set npms python config key to the appropriate value: npm config set python /path/to/executable/python2.7 Note that OS X is just a flavour of Unix and so needs python, make, and C/C. An easy way to obtain these is to install XCode from Apple, and then use it to install the command line tools (under Preferences - Downloads).  1、下载安装Python2.7设置环境变量以下命令可指定npm用哪个版本的python : npm config set python D:\python27 d:\npm config get  查看当前npm的安装环境 ; cli configs metrics-registry https://registry.npm.taobao.org/ scope user-agent npm/6.14.13 node/v14.17.1 win32 x64 ; userconfig C:\Users\Administrator\.npmrc python D:\\Python27\\python.exe registry https://registry.npm.taobao.org/ ; builtin config undefined prefix C:\\Users\\Administrator\\AppData\\Roaming\\npm ; node bin location D:\nodejs\node.exe ; cwd d:\BaiduYunDownload\vue_backup\vue_backup\vue_agent ; HOME C:\Users\Administrator ; npm config ls -l to show all defaults. npm跟node.js 版本对照表
http://wiki.neutronadmin.com/news/392815/

相关文章:

  • 怎样看网站做的好不好免费微商城平台官网
  • 网站建设的市场调研分析跨境电商卖什么东西比较好
  • 网站建设合同规定大连网站建设仟亿科技
  • 网站域名怎么做解析建设网站需要那些技术人员
  • 袜子技术支持北京网站建设网站开发和网页开发的区别
  • 企业网站做的好的有什么公司昆明 网站建设兼职
  • 无锡免费网站制作白银市建设局网站首页
  • 贵州网站建设推荐广东品牌网站建设968
  • 怎么查看网站的ftp微商城系统开发
  • 长沙中小企业网站制作广州白云区网站开发
  • 网站推广优化哪家公司好怎么用wordpress做模板
  • 在哪个网站可以做试卷成都网络设计公司
  • 搭建网站什么意思网站关键词库怎么做有什么效果
  • 瑞安地区建设网站临沂制作网站软件
  • 网站模版自适应html5高端酒水饮料企业网站模版
  • 医药类网站建设评价怎么做网站二维码
  • 湛江网站如何制作wordpress获取本文地址和标题
  • 济源专业做网站公司滨州网络推广
  • 打开网站建设中是什么意思拖拉建网站
  • 潜水艇官方网站代理营销活动推广策划
  • 高端网站建设浩森宇特导航滑动整屏网站
  • 西山区建设局网站火鸟门户系统优点
  • 网站建设 天秀网络ip代理免费
  • 南山做网站多少钱做电影网站怎么批量去水印
  • 网站中在线咨询怎么做做一个论坛网站要多少钱
  • 门户网站 技术方案关键词优化教程
  • 银川网站制作报价徐州推广网络营销公司
  • 东莞建站多少钱手机的网站建设目标是什么意思
  • 网站备案审核需要多久网站高质量外链
  • 电子商务网站用什么语言开发网站搭建的注意事项