物料广场的npm install包名错误

小程序开发相关产品技术讨论,包括面板、智能小程序、React Native、Ray跨端框架、Panel SDK、微信小程序、小程序开发工具(IDE)及其他开发技术相关等话题


Post Reply
User avatar
angelofan
Posts: 23

https://developer.tuya.com/material/lib ... de=TyEmpty

【安装】部分

$ npm install @ray/components-ty-empty

npm库中没有此包名

此页面上面的【基本信息】中,【NPM 包名】是 @ray-js/components-ty-empty,此包名真实存在

所以安装命令应改为:

$ npm install @ray-js/components-ty-empty


Tags:
User avatar
angelofan
Posts: 23

Re: 物料广场的npm install包名错误

附图

00.jpg
01.jpg
03.jpg
lshinylee
Posts: 298

Re: 物料广场的npm install包名错误

感谢反馈 我们更新下错误的文档信息

:D :D :D

User avatar
angelofan
Posts: 23

Re: 物料广场的npm install包名错误

顺便问一下,这个物料是不能在“面板小程序”中使用吗?安装以后“Tuya MiniApp Tools”中编译报错

25091.jpg

package.json

Code: Select all

{
  "name": "public-sdm-template",
  "version": "1.0.1",
  "description": "Panel SDM Template",
  "main": "index.js",
  "private": true,
  "author": "Tuya.inc",
  "license": "MIT",
  "scripts": {
    "start": "ray start --target tuya --bundler=webpack",
    "build": "ray build --target tuya --bundler=webpack",
    "lint": "eslint src --ext .js,.jsx,.ts,.tsx --fix"
  },
  "dependencies": {
    "@ray-js/components-ty-empty": "^0.0.3",
    "@ray-js/panel-sdk": "^1.10.0",
    "@ray-js/ray": "^1.4.45",
    "@ray-js/ray-error-catch": "^0.0.20",
    "@ray-js/svg": "^0.0.6",
    "@reduxjs/toolkit": "^1.9.3",
    "clsx": "^1.2.1",
    "react-redux": "^7.2.1",
    "redux-logger": "^3.0.6"
  },
  "devDependencies": {
    "@commitlint/cli": "^7.2.1",
    "@commitlint/config-conventional": "^9.0.1",
    "@ray-js/cli": "^1.4.45",
    "@types/lodash-es": "^4.17.6",
    "@types/react": "^17.0.24",
    "@types/react-dom": "^17.0.9",
    "core-js": "^3.29.1",
    "eslint-config-tuya-panel": "^0.4.1",
    "husky": "^1.2.0",
    "lint-staged": "^10.2.11",
    "typescript": "^4.4.3"
  },
  "husky": {
    "hooks": {
      "commit-msg": "commitlint -E HUSKY_GIT_PARAMS --config commitlint.config.js",
      "pre-commit": "lint-staged"
    }
  },
  "lint-staged": {
    "*.{ts,tsx,js,jsx}": [
      "eslint --fix",
      "git add"
    ],
    "*.{json,md,yml,yaml}": [
      "prettier --write",
      "git add"
    ]
  }
}
Post Reply