jd-opensource / jd-opensource/taro-ui
npm ERR! Unsupported URL Type "workspace:": workspace:^
- Dominant language
- TypeScript
- Stars
- 4.7k
- Forks
- 740
- PR merge metrics
- No merged PRs in 30d
Description
**问题描述**
Fork 该工程时,在taro-ui-demo-rn目录中执行:pnpm run dev:rn,报错
**复现步骤**
```js
// 这里可以贴代码
```
Installing React-Native related packages:
react@^18.1.0 react-dom@^18.1.0 react-native@^0.70.5 expo@~47.0.3 @tarojs/taro-rn @tarojs/components-rn @tarojs/rn-runner @tarojs/rn-supporter @tarojs/runtime-rn
Error when detecting React-Native packages:
Error: Command failed: npm install "react@^18.1.0" "react-dom@^18.1.0" "react-native@^0.70.5" "expo@~47.0.3" "@tarojs/taro-rn" "@tarojs/components-rn" "@tarojs/rn-runner" "@tarojs/rn-supporter" "@tarojs/runtime-rn" --save
npm ERR! code EUNSUPPORTEDPROTOCOL
npm ERR! Unsupported URL Type "workspace:": workspace:^
npm ERR! A complete log of this run can be found in: /Users/XXX/.npm/_logs/2024-06-20T08_41_01_694Z-debug-0.log
at ChildProcess.exithandler (node:child_process:422:12)
at ChildProcess.emit (node:events:517:28)
at maybeClose (node:internal/child_process:1098:16)
at Process.ChildProcess._handle.onexit (node:internal/child_process:303:5) {
code: 1,
killed: false,
signal: null,
cmd: 'npm install "react@^18.1.0" "react-dom@^18.1.0" "react-native@^0.70.5" "expo@~47.0.3" "@tarojs/taro-rn" "@tarojs/components-rn" "@tarojs/rn-runner" "@tarojs/rn-supporter" "@tarojs/runtime-rn" --save'
}
TIP: 1) Try to remove React-Native dependencies in package.json and shoot again; 2) Install the packages above manually.
**期望行为**
**报错信息**
**系统信息**
**补充信息**
Contributor guide
Research direction
Start in taro-ui-demo-rn by inspecting the package.json dependencies and the pnpm run dev:rn entry point. Reproduce the command and trace the npm install invocation that reports the workspace:^ protocol error. Done means the React Native dependencies install successfully and the development command proceeds without that error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js, react-native
- Domain
- build-system, mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100