Angular 使用tensorflowjs项目运行纱线手表时出错
我正在使用Ubuntu18与纱线和节点V8.11.3 在这里运行示例时 使用以下shell命令Angular 使用tensorflowjs项目运行纱线手表时出错,angular,ubuntu,yarnpkg,tensorflow.js,Angular,Ubuntu,Yarnpkg,Tensorflow.js,我正在使用Ubuntu18与纱线和节点V8.11.3 在这里运行示例时 使用以下shell命令 git clone https://github.com/tensorflow/tfjs-examples cd tfjs-examples/webcam-transfer-learning yarn yarn watch 当到达最后一行代码时,我遇到以下错误: 纱线运行v1.9.4$cross env NODE_env=development parcel index.html --没有hmr--
git clone https://github.com/tensorflow/tfjs-examples
cd tfjs-examples/webcam-transfer-learning
yarn
yarn watch
当到达最后一行代码时,我遇到以下错误:
纱线运行v1.9.4$cross env NODE_env=development parcel index.html
--没有hmr--运行在沙漏沙建筑asyncToGenerator.js的开放服务器。。。events.js:183
投掷者;//未处理的“错误”事件^
错误:手表
/home/user/webstromprojects/tfjs示例/网络摄像头转移学习/node_modules/core js/modules/es6.math.fround.js
FSWatcher.start上的eNOPC在_errnoException(util.js:992:11)处
(fs.js:1382:19)在Object.fs.watch(fs.js:1408:11)在
createFsWatchInstance
(/home/user/webstromprojects/tfjs-examples/webcam-transfer-learning/node_-modules/chokidar/lib/nodefs-handler.js:37:15)
在setFsWatchListener
(/home/user/webstromprojects/tfjs-examples/webcam-transfer-learning/node_-modules/chokidar/lib/nodefs-handler.js:80:15)
在FSWatcher.NodeFsHandler.用nodefs观察
(/home/user/webstromprojects/tfjs examples/webcam transfer learning/node_modules/chokidar/lib/nodefs handler.js:232:14)在FSWatcher.NodeFsHandler._handleFile
(/home/uwer/webstoreprojects/tfjs examples/webcam transfer learning/node_modules/chokidar/lib/nodefs handler.js:259:21)在FSWatcher。
FSReqWrap.oncomplete(fs.js:153:5)处的(/home/user/WebstormProjects/tfjs examples/webcam transfer-learning/node_modules/chokidar/lib/nodefs handler.js:480:21)错误命令失败,退出
代码1。信息访问
有关此命令的文档
我没找到关于它的任何东西。
我尝试更改tfjs版本,但没有成功
我升级了节点,并尝试将其降级到早期的稳定版本。
我们试着在windows机器上运行这个,它成功了
我们尝试使用在windows机器上运行的相同版本:npm 8.10和Thread 5.04,但没有成功
这里可能有什么问题
谢谢在终端中使用以下两个命令解决了问题,我真的不知道为什么,有人能帮我解释一下吗
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
sudo sysctl --system
然后
工作得很漂亮
谢谢 另一种选择是使用:
rm -rf node_modules
rm package-lock.json yarn.lock
npm cache clear --force
npm install
yarn watch
为我解决 您正在覆盖内核设置,错误可能是因为您需要比内核允许的最大值更多/更少的观察者(我只是假设)。同样的事情也发生在我的Ubuntu x64上。
rm -rf node_modules
rm package-lock.json yarn.lock
npm cache clear --force
npm install
yarn watch