我想在 RaspberryPi Zero W 上创建一个 React 应用程序。
现在,create-react-app需要NodeJs版本> = 14.x.x。
我曾经选择https://nodejs.org/dist/中存在的构建来在RPZ上安装NodeJs,但兼容的版本停止在11.x.x。
我尝试了以下方法:
现在如何在RaspberryPi Zero上使用create-react-app?
如果您使用的是 Debian,那么您可以使用来自 https://nodesource.com 的二进制文件安装最新的 Node.js,然后使用 npx 创建一个 React 网站。
$ sudo apt update
$ sudo apt upgrade
$ curl -fsSL https://deb.nodesource.com/setup_21.x | sudo -E bash - &&\
$ sudo apt-get install nodejs
$ npx create-react-app my-app
$ cd my-app
$ npm start