Skip to content

Commit

Permalink
fix: remove tensorflow-tfjs-node cannot install in pnpm
Browse files Browse the repository at this point in the history
  • Loading branch information
chaxus committed Feb 14, 2024
1 parent 51c3e42 commit 3bd0608
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 3 deletions.
3 changes: 2 additions & 1 deletion bin/clean.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ rm -rf packages/ranuts/node_modules/
rm -rf packages/docs/node_modules/
rm -rf packages/ranite/node_modules/
rm -rf packages/ml/node_modules/
npm cache clean --force
npm cache clean --force
rm -rf pnpm-lock.yaml
2 changes: 1 addition & 1 deletion packages/ml/bin/build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
bin=./node_modules/.bin
cnpm install @tensorflow/tfjs-node
# build es and splite bundle
$bin/vite build -c ./config/build.es.ts
# build umd
# TODO: splite bundle
$bin/vite build -c ./config/build.umd.ts
2 changes: 1 addition & 1 deletion packages/ml/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"dependencies": {
"@ranui/react": "workspace:^",
"@tensorflow/tfjs": "^4.16.0",
"@tensorflow/tfjs-node": "^4.16.0",
"@tensorflow/tfjs-node": "^4.17.0",
"@tensorflow/tfjs-vis": "^1.5.1",
"ranuts": "workspace:0.1.0-alpha.10",
"react": "^18.2.0",
Expand Down
36 changes: 36 additions & 0 deletions packages/ml/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@

# 查看ip地址

`https://tool.chinaz.com/speedtest/storage.googleapis.com`

storage.googleapis.com 142.251.43.27

# Error

```sh
node_modules/.pnpm/@[email protected]/node_modules/@tensorflow/tfjs-node: Running install script, failed in 201ms
.../node_modules/@tensorflow/tfjs-node install$ node scripts/install.js
│ CPU-darwin-4.17.0.tar.gz
* Downloading libtensorflow
│ https://storage.googleapis.com/tf-builds/libtensorflow_r2_7_darwin_arm64_cpu.tar.gz
│ node:events:490
│ throw er; // Unhandled 'error' event
│ ^
│ Error: read ECONNRESET
│ at TLSWrap.onStreamRead (node:internal/stream_base_commons:217:20)
│ Emitted 'error' event on ClientRequest instance at:
│ at TLSSocket.socketErrorListener (node:_http_client:496:9)
│ at TLSSocket.emit (node:events:512:28)
│ at emitErrorNT (node:internal/streams/destroy:151:8)
│ at emitErrorCloseNT (node:internal/streams/destroy:116:3)
│ at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
│ errno: -54,
│ code: 'ECONNRESET',
│ syscall: 'read'
│ }
│ Node.js v19.6.0
```
- slove
```sh
cnpm install @tensorflow/tfjs-node
```

0 comments on commit 3bd0608

Please sign in to comment.