Py学习  »  Git

部署应用程序时npm生成错误(客户端文件夹中的digital ocean)

Developer dayan • 1 年前 • 68 次点击  

我试图部署我的应用程序,但当我的服务器文件夹和客户端完全完成,我做npm安装,然后我做“npm运行构建”这就是我得到的,我不知道为什么会发生这种情况,因为我从来没有见过这种类型的错误,这是非常烦人的最后时刻。

我可以提供我的包裹。Json也适用于客户端文件夹。

这些是日志

npm run build

> client@1.0.0 build
> next build

info  - Loaded env from /home/ibraradmin/client/.env.local
info  - Using webpack 5. Reason: Enabled by default https://nextjs.org/docs/messages/webpack5
warn  - Detected next.config.js, no exported configuration found. https://nextjs.org/docs/messages/empty-configuration
info  - Checking validity of types  
warn  - No ESLint configuration detected. Run next lint to begin setup

> Build error occurred
Error: > Build directory is not writeable. https://nextjs.org/docs/messages/build-dir-not-writeable
    at /home/ibraradmin/client/node_modules/next/dist/build/index.js:275:19
    at async Span.traceAsyncFn (/home/ibraradmin/client/node_modules/next/dist/telemetry/trace/trace.js:60:20)
    at async Object.build [as default] (/home/ibraradmin/client/node_modules/next/dist/build/index.js:77:25)
info  - Creating an optimized production build

这是包裹。json

{
  "name": "client",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "dev": "node server.js",
    "build": "next build",
    "start": "next start",
    "lint": "next lint"
  },
  "author": "Xidas Studios",
  "license": "MIT",
  "dependencies": {
    "@ant-design/icons": "^4.6.4",
    "@emotion/react": "^11.4.1",
    "@emotion/styled": "^11.3.0",
    "@material-ui/icons": "^4.11.2",
    "@mui/material": "^5.0.0",
    "@stripe/stripe-js": "^1.20.3",
    "antd": "^4.16.13",
    "axios": "^0.21.4",
    "axois": "^0.0.1-security",
    "bootstrap": "^5.1.1",
    "express": "^4.17.1",
    "fs": "^0.0.1-security",
    "http-proxy-middleware": "^2.0.1",
    "install": "^0.13.0",
    "next": "10.2.0",
    "next-csrf": "^0.1.2",
    "npm": "^8.0.0",
    "react": "^17.0.2",
    "react-bootstrap": "^2.0.0-rc.0",
    "react-dom": "^17.0.2",
    "react-image-file-resizer": "^0.4.7",
    "react-markdown": "^7.0.1",
    "react-native-popup-confirm-toast": "^2.0.3",
    "react-native-status-bar-height": "^2.6.0",
    "react-player": "^2.9.0",
    "react-router-dom": "^5.3.0",
    "react-toastify": "^8.0.2",
    "request": "^2.79.0",
    "simple-react-footer": "^1.0.2",
    "styled-components": "^5.3.1"
  }
}

如果有人能帮我的话,我会很感激的

Python社区是高质量的Python/Django开发社区
本文地址:http://www.python88.com/topic/134315
 
68 次点击