手机浏览 RSS 2.0 订阅 膘叔的简单人生 , 腾讯云RDS购买 | 超便宜的Vultr , 注册 | 登陆
浏览模式: 标准 | 列表2019年07月21日的文章

weui小程序安装出错:[WARNING] 找不到编译器:wepy-compiler-less。

 直接git clone weui小程序的项目,然后wepy build会出错。即使之前你运行npm install。

我是直接报:[WARNING] 找不到编译器:wepy-compiler-less。
解决方案不复杂:先npm install less 再 wepy build,一般就解决了。build的时候会自己安装wepy-compiler-less。
 
如果象我,还遇到下面的错误
npm WARN eslint-config-standard@7.1.0 requires a peer of eslint-plugin-promise@>=3.3.0 but none is installed. You must install peer dependencies yourself.
npm WARN wepy-compiler-less@1.3.14 requires a peer of less@^3.8.1 but none is installed. You must install peer dependencies yourself.
npm WARN wepy-weui-demo@1.0.0 No repository field.
 
+ wepy-compiler-less@1.3.14
updated 1 package and audited 7975 packages in 3.378s
found 10 vulnerabilities (7 low, 3 moderate)
 
这时候就需要根据提示:npm install -g eslint-plugin-promise@>=3.3.0,进行安装(其实上面也有说,是因为less没有安装)
这样的话,其实问题就都好解决

Tags: weui, wepy, 小程序, npm

vagrant使用parallels desktop

 使用laravel的人,好象一直都推荐使用homestead,所以我也就尝试了一下。由于默认的vagrant都是用的virtual box,而我一直是嫌弃他繁,而且几年前耗的资源让我心有余悸,再加上我本地本来就有Parallels Desktop,所以我就找找资料,看看能不能使用parallels。

结果是出人意料的好,官方也支持,只是需要安装个插件,戳这里看一下:https://parallels.github.io/vagrant-parallels/docs/getting-started.html,几行命令行可:vagrant plugin install vagrant-parallels

然后就是初始化了,vagrant init laravel/homestead,这时候会跳出个选择,就象这样:

XML/HTML代码
  1. ==> box: Loading metadata for box 'laravel/homestead'  
  2.     box: URL: https://vagrantcloud.com/laravel/homestead  
  3. This box can work with multiple providers! The providers that it  
  4. can work with are listed below. Please review the list and choose  
  5. the provider you will be working with.  
  6.   
  7. 1) hyperv  
  8. 2) parallels  
  9. 3) virtualbox  
  10. 4) vmware_desktop  
  11.   
  12. Enter your choice: 2  
  13. ==> box: Adding box 'laravel/homestead' (v8.0.0) for provider: parallels  

 

选择2 就行了。然后就会开始下载。由于下载地址在github上面,然后实际 是在aws的S3上,痛苦的事情就这样来了。。。不爬梯子动也不动。番了墙也只有400多K,所幸,1个多小时就下载下来了。

然后vagrant up --provider=parallels,这样就好了

XML/HTML代码
  1. vagrant up --provider=parallels  
  2. /opt/vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/util/which.rb:37: warning: Insecure world writable dir /server in PATH, mode 040777  
  3. Bringing machine 'default' up with 'parallels' provider...  
  4. ==> default: Registering VM image from the base box 'laravel/homestead'...  
  5. ==> default: Creating new virtual machine as a linked clone of the box image...  
  6. ==> default: Unregistering the box VM image...  
  7. ==> default: Setting the default configuration for VM...  
  8. ==> default: Checking if box 'laravel/homestead' version '8.0.0' is up to date...  
  9. ==> default: Setting the name of the VM: blessappyzhancom_default_1563640904299_97304  
  10. ==> default: Preparing network interfaces based on configuration...  
  11.     default: Adapter 0: shared  
  12. ==> default: Clearing any previously set network interfaces...  
  13. ==> default: Running 'pre-boot' VM customizations...  
  14. ==> default: Booting VM...  
  15. ==> default: Waiting for machine to boot. This may take a few minutes...  
  16.     default: SSH address: 10.211.55.9:22  
  17.     default: SSH username: vagrant  
  18.     default: SSH auth method: private key  
  19.     default: Warning: Connection refused. Retrying...  
  20.     default:   
  21.     default: Vagrant insecure key detected. Vagrant will automatically replace  
  22.     default: this with a newly generated keypair for better security.  
  23.     default:   
  24.     default: Inserting generated public key within guest...  
  25.     default: Removing insecure key from the guest if it's present...  
  26.     default: Key inserted! Disconnecting and reconnecting using new SSH key...  
  27. ==> default: Machine booted and ready!  
  28. ==> default: Checking for Parallels Tools installed on the VM...  
  29. ==> default: Parallels Tools installed on this VM are outdated! In most cases  
  30. ==> default: this is fine but in rare cases it can cause things such as shared  
  31. ==> default: folders to not work properly. If you see shared folder errors,  
  32. ==> default: please update Parallels Tools within the virtual machine and  
  33. ==> default: reload your VM.  
  34. ==> default: Installing the proper version of Parallels Tools. This may take a few minutes...  
  35. ==> default: Parallels Tools have been installed. Rebooting the VM...  
  36. ==> default: Attempting graceful shutdown of VM...  
  37. ==> default: Running 'pre-boot' VM customizations...  
  38. ==> default: Booting VM...  
  39. ==> default: Waiting for machine to boot. This may take a few minutes...  
  40. ==> default: Machine booted and ready!  
  41. ==> default: Mounting shared folders...  
  42.     default: /vagrant => /server/wwwroot/yzhan/test.com  

 

运行一下vagrant ssh ,顺利登录,而且看到 当前项目目录下有一个 .vagrant的目录,里面都是一些配置文件等。

到此,安装结束,看了下进程,占CPU0.x,内存400多M。ssh进去后php-fpm的进程超级多。从5.6~7.3的都有。安心的用了

 

Tags: vagrant