这是indexloc提供的服务,不要输入任何密码
Skip to content

H5编译的时候:Cannot find module "fs"。 #569

@haoranya

Description

@haoranya

bug描述
项目初始化后,引入使用node的require('fs')模块会直接报错,找不到fs
复现bug的步骤

  1. cml init project
  2. cd test
  3. cml dev
  4. index.cml 的script中添加:const fs = require('fs')

问题截图
image

编译环境信息

  • chameleon-tool 版本:1.0.8
  • nodejs版本 npm版本:[node v10.13.0、npm 6.4.1]
  • 电脑操作系统: macOS Big Sur 11.0.1

运行环境信息

  • 端版本:PC Chrome浏览器 91.0.4472.114
  • 手机机型:

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions