fis-kernel icon indicating copy to clipboard operation
fis-kernel copied to clipboard

fix: fix fis.require package need

Open xtx1130 opened this issue 7 years ago • 0 comments

  • node version: 6.7.0

  • platform: macOS 10.12

  • errors:
    老的项目,在使用fis开发的时候,使用build.sh -s的时候,偶尔会提示如下错误:

[ERROR] unable to load plugin [fis-optimizer-php-template-compress]

此时需要全局安装相应的包才能解决(旧的工程目录下没有package.json, package.json 存放于_build文件夹中)。

  • fixed:
    fis.require添加判断,如果当前文件目录不存在node_modules,会扫描当前文件夹的目录,免去全局安装,只需在项目中具有package.json的目录下npm i [package]即可。require默认不会去_build文件夹下面搜索node_modules,通过klaw实现工程目录下的全局搜索。

xtx1130 avatar Dec 08 '17 10:12 xtx1130