我想托管一个react.js服务器端渲染,因为ffmpeg用SharedArrayBuffer杀死我没有定义
我已经尝试了这么多的托管服务提供商,如firebase,但现在我想托管它到Vercel,但我不知道如何使它与Reactssr的工作。有人可以帮助我吗?
当我在我的机器中运行“ssr”命令时,它的工作和ffmpeg没有抛出“坏内存”或“SharedArrayBuffer未定义”,但当我在vercel构建命令中运行它时,它卡住了,但index.js/server.js正在运行,我知道因为主脚本正在运行,不会停止,所以构建卡住了,但有任何解决方案吗?我已经搜索了这个问题,但我猜还没有人问过这个问题
的数据
这是package.json的代码
{
"name": "ultimatesheep-vidreverse",
"version": "0.1.0",
"private": true,
"dependencies": {
"@babel/preset-env": "^7.18.10",
"@babel/preset-react": "^7.18.6",
"@babel/register": "^7.18.9",
"@ffmpeg/core": "^0.11.0",
"@ffmpeg/ffmpeg": "^0.11.0",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.3.0",
"@testing-library/user-event": "^13.5.0",
"bootstrap": "^5.2.0",
"cors": "^2.8.5",
"ignore-styles": "^5.0.1",
"react": "^18.2.0",
"react-bootstrap": "^2.5.0",
"react-dom": "^18.2.0",
"react-scripts": "5.0.1",
"uuid": "^8.3.2",
"web-vitals": "^2.1.4"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject",
"ssr": "npm run build && node backend/index.js",
"deploy": "npm run build && firebase deploy",
"git" : "git add . && git commit -m 'ahawdaw' && git push -u origin main"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"externals": {
"react": "React"
},
"description": "This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).",
"main": "backend/index.js",
"keywords": [],
"author": "",
"license": "ISC"
}
字符串
的
1条答案
按热度按时间luaexgnf1#
如果你也有和我一样的问题,试试看next.js,我已经解决了所有的问题!