0

伙计们,你们好吗?我希望你能帮助我解决这个问题,我已经尝试构建要在我的实时 Web 服务器中托管的生产文件夹,但是我遇到了这个问题,构建文件夹没有创建。谢谢你。

这是我从事的项目: https ://github.com/codingwithdidem/emojifacesdapp

这就是我运行“npm run build”时的问题

> build
> next build

info  - Loaded env from /home/user/folder1/emojifacesdapp/.env
info  - Checking validity of types  

./components/Header.js
17:13  Warning: Effect callbacks are synchronous to prevent race conditions. Put the async function inside:

useEffect(() => {
  async function fetchData() {
    // You can await here
    const response = await MyAPI.getData(someId);
    // ...
  }
  fetchData();
}, [someId]); // Or [] if effect doesn't need props or state

Learn more about data fetching with Hooks: https://reactjs.org/link/hooks-data-fetching  react-hooks/exhaustive-deps
23:6  Warning: React Hook useEffect has missing dependencies: 'addWalletListener' and 'setStatus'. Either include them or remove the dependency array.  react-hooks/exhaustive-deps

./components/Hero.js
22:3  Warning: React Hook useEffect contains a call to 'setMaxMintAmount'. Without a list of dependencies, this can lead to an infinite chain of updates. To fix this, pass [] as a second argument to the useEffect Hook.  react-hooks/exhaustive-deps
22:13  Warning: Effect callbacks are synchronous to prevent race conditions. Put the async function inside:

useEffect(() => {
  async function fetchData() {
    // You can await here
    const response = await MyAPI.getData(someId);
    // ...
  }
  fetchData();
}, [someId]); // Or [] if effect doesn't need props or state

Learn more about data fetching with Hooks: https://reactjs.org/link/hooks-data-fetching  react-hooks/exhaustive-deps

info  - Need to disable some ESLint rules? Learn more here: https://nextjs.org/docs/basic-features/eslint#disabling-rules
info  - Creating an optimized production build  
info  - Compiled successfully
info  - Collecting page data  
info  - Generating static pages (3/3)
info  - Finalizing page optimization  

Page                                       Size     First Load JS
┌ ○ / (868 ms)                             728 kB          800 kB
├   /_app                                  0 B            71.5 kB
├ ○ /404                                   196 B          71.7 kB
└ λ /api/hello                             0 B            71.5 kB
+ First Load JS shared by all              71.5 kB
  ├ chunks/framework-dc33c0b5493501f0.js   42 kB
  ├ chunks/main-75d0abddddf86da9.js        27.9 kB
  ├ chunks/pages/_app-aabfb876ade56af8.js  640 B
  ├ chunks/webpack-c66a1cc0a3689c22.js     892 B
  └ css/377c08f0d636ab0c.css               3.06 kB

λ  (Server)  server-side renders at runtime (uses getInitialProps or getServerSideProps)
○  (Static)  automatically rendered as static HTML (uses no initial props)
4

0 回答 0