账号密码登录
微信安全登录
微信扫描二维码登录

登录后绑定QQ、微信即可实现信息互通

手机验证码登录
找回密码返回
邮箱找回 手机找回
注册账号返回
其他登录方式
分享
  • 收藏
    X
    Error: Could not locate the bindings file.use framework7 CLI
    50
    0

    问题描述

    使用Framework7 Command-Line Interface (CLI)工具创建模版出现问题

    sicmatr1xMacBook-Pro:f7demo sicmatr1x$ framework7 create --ui
    /usr/local/lib/node_modules/framework7-cli/node_modules/bindings/bindings.js:135
      throw err;
      ^
    
    Error: Could not locate the bindings file. Tried:
     → /usr/local/lib/node_modules/framework7-cli/node_modules/sharp/build/sharp.node
     → /usr/local/lib/node_modules/framework7-cli/node_modules/sharp/build/Debug/sharp.node
     → /usr/local/lib/node_modules/framework7-cli/node_modules/sharp/build/Release/sharp.node
     → /usr/local/lib/node_modules/framework7-cli/node_modules/sharp/out/Debug/sharp.node
     → /usr/local/lib/node_modules/framework7-cli/node_modules/sharp/Debug/sharp.node
     → /usr/local/lib/node_modules/framework7-cli/node_modules/sharp/out/Release/sharp.node
     → /usr/local/lib/node_modules/framework7-cli/node_modules/sharp/Release/sharp.node
     → /usr/local/lib/node_modules/framework7-cli/node_modules/sharp/build/default/sharp.node
     → /usr/local/lib/node_modules/framework7-cli/node_modules/sharp/compiled/11.10.1/darwin/x64/sharp.node
     → /usr/local/lib/node_modules/framework7-cli/node_modules/sharp/addon-build/release/install-root/sharp.node
     → /usr/local/lib/node_modules/framework7-cli/node_modules/sharp/addon-build/debug/install-root/sharp.node
     → /usr/local/lib/node_modules/framework7-cli/node_modules/sharp/addon-build/default/install-root/sharp.node
     → /usr/local/lib/node_modules/framework7-cli/node_modules/sharp/lib/binding/node-v67-darwin-x64/sharp.node
        at bindings (/usr/local/lib/node_modules/framework7-cli/node_modules/bindings/bindings.js:126:9)
        at Object.<anonymous> (/usr/local/lib/node_modules/framework7-cli/node_modules/sharp/lib/constructor.js:10:34)
        at Module._compile (internal/modules/cjs/loader.js:738:30)
        at Object.Module._extensions..js (internal/modules/cjs/loader.js:749:10)
        at Module.load (internal/modules/cjs/loader.js:630:32)
        at tryModuleLoad (internal/modules/cjs/loader.js:570:12)
        at Function.Module._load (internal/modules/cjs/loader.js:562:3)
        at Module.require (internal/modules/cjs/loader.js:667:17)
        at require (internal/modules/cjs/helpers.js:20:18)
        at Object.<anonymous> (/usr/local/lib/node_modules/framework7-cli/node_modules/sharp/lib/index.js:3:15)
    

    问题出现的平台版本

    MacOs 10.13.6

    相关链接

    https://framework7.io/cli/#cr...

    0
    打赏
    收藏
    点击回答
        全部回答
    • 0
    • 回忆终是回忆 普通会员 1楼

      The error message "Could not locate the bindings file" is typically caused when you are trying to use a framework or library that requires a binding file to be located in your system. The binding file is a set of instructions that tell the framework how to interact with the underlying system. In the case of Framework7 CLI, the binding file is typically located in the "node_modules" directory of your project. If you are unable to locate this file, you may need to update your package.json file to specify the path to the binding file. Here is an example of how you might modify your package.json file to specify the path to the binding file: json { "name": "my-project", "version": "1.0.0", "description": "A project description", "main": "index.js", "scripts": { "start": "node index.js" }, "dependencies": { "framework7": "^4.2.0" }, "author": "Your Name", "license": "MIT" }

      In this example, the binding file is specified in the "dependencies" section of the package.json file. You will need to install the framework7 package in your project in order to use it with Framework7 CLI. I hope this helps! Let me know if you have any further questions.

    更多回答
    扫一扫访问手机版
    • 回到顶部
    • 回到顶部