Edge Functions environment exceeded maximum allowed runtime

Hi, I’m trying to upload a website with serverless functions. It works fine locally but seems to time out on netlify build. I’m new to serverless functions so I’m sorry if I’m asking something stupid.

Would appreciate any help :slight_smile:

5:44:15 PM: (dev.command completed in 9.6s)
5:44:15 PM: - Setting up the Edge Functions environment. This may take a couple of minutes.
5:44:15 PM: ---------------------------
5:44:15 PM: Error: Unable to open browser automatically: Running inside a docker container
5:44:15 PM: Please open your browser and open the URL below:
5:44:15 PM: http://localhost:8888
5:44:15 PM: ---------------------------
5:44:15 PM: 
5:44:15 PM:    ┌─────────────────────────────────────────────────┐
5:44:15 PM:    │                                                 │
5:44:15 PM:    │   ◈ Server now ready on http://localhost:8888   │
5:44:15 PM:    │                                                 │
5:44:15 PM:    └─────────────────────────────────────────────────┘
5:44:15 PM: 
5:44:15 PM: No issues found.
5:44:17 PM: ✔ Setting up the Edge Functions environment. This may take a couple of minutes.
6:19:17 PM: Build exceeded maximum allowed runtime
6:19:17 PM: ◈ Reloading headers files from []
6:19:17 PM: ◈ Reloading redirect rules from []
6:19:17 PM: ◈ Removed function dailyTrends.
6:19:17 PM: ◈ Removed function interestOverTime.
6:19:17 PM: Failed to compile.
6:19:17 PM: 
6:19:17 PM: Error: ENOENT: no such file or directory, open '/opt/build/repo/node_modules/ansi-html-community/index.js'
6:19:17 PM: LOG from webpack.FileSystemInfo
6:19:17 PM: <w> Managed item /opt/build/repo/node_modules/core-js-pure isn't a directory or doesn't contain a package.json (see snapshot.managedPaths option)
6:19:17 PM: + 17 hidden lines
6:19:17 PM: WARNING in [eslint]
6:19:17 PM: src/components/Home Page/HomePage.js
6:19:17 PM:   Line 11:10:  'graphData' is assigned a value but never used                                                                            no-unused-vars
6:19:17 PM:   Line 72:11:  'chart' is assigned a value but never used                                                                                no-unused-vars
6:19:17 PM:   Line 76:6:   React Hook useEffect has a missing dependency: 'fetchInterestOverTime'. Either include it or remove the dependency array  react-hooks/exhaustive-deps
6:19:17 PM:   Line 89:6:   React Hook useEffect has a missing dependency: 'fetchData'. Either include it or remove the dependency array              react-hooks/exhaustive-deps
6:19:17 PM: ERROR in ./node_modules/ansi-html-community/index.js
6:19:17 PM: Module build failed (from ./node_modules/source-map-loader/dist/cjs.js):
6:19:17 PM: Error: ENOENT: no such file or directory, open '/opt/build/repo/node_modules/ansi-html-community/index.js'
6:19:17 PM: ERROR in ./node_modules/core-js-pure/features/global-this.js
6:19:17 PM: Module build failed (from ./node_modules/source-map-loader/dist/cjs.js):
6:19:17 PM: Error: ENOENT: no such file or directory, open '/opt/build/repo/node_modules/core-js-pure/features/global-this.js'
6:19:17 PM: ERROR in main
6:19:17 PM: Module not found: Error: Can't resolve '/opt/build/repo/src/index.js' in '/opt/build/repo'
6:19:17 PM: ERROR in   Error: Child compilation failed:
6:19:17 PM:   Module not found: Error: Can't resolve '/opt/build/repo/public/index.html' in   '/opt/build/repo'  ModuleNotFoundError: Module not found: Error: Can't resolve '/opt/build/repo/p  ublic/index.html' in '/opt/build/repo'      at /opt/build/repo/node_modules/webpack/lib/Compilation.js:2016:28
6:19:17 PM:       at /opt/build/repo/node_modules/webpack/lib/NormalModuleFactory.js:798:13
6:19:17 PM:       at eval (eval at create (/opt/build/repo/node_modules/tapable/lib/HookCode  Factory.js:33:10), <anonymous>:10:1)
6:19:17 PM:       at /opt/build/repo/node_modules/webpack/lib/NormalModuleFactory.js:270:22
6:19:17 PM:       at eval (eval at create (/opt/build/repo/node_modules/tapable/lib/HookCode  Factory.js:33:10), <anonymous>:9:1)
6:19:17 PM:       at /opt/build/repo/node_modules/webpack/lib/NormalModuleFactory.js:434:22
6:19:17 PM:       at /opt/build/repo/node_modules/webpack/lib/NormalModuleFactory.js:116:11
6:19:17 PM:       at /opt/build/repo/node_modules/webpack/lib/NormalModuleFactory.js:670:25
6:19:17 PM:       at /opt/build/repo/node_modules/webpack/lib/NormalModuleFactory.js:855:8
6:19:17 PM:       at /opt/build/repo/node_modules/webpack/lib/NormalModuleFactory.js:975:5
6:19:17 PM:   - Compilation.js:2016
6:19:17 PM:     [repo]/[webpack]/lib/Compilation.js:2016:28
6:19:17 PM:   - NormalModuleFactory.js:798
6:19:17 PM:     [repo]/[webpack]/lib/NormalModuleFactory.js:798:13
6:19:17 PM:   - NormalModuleFactory.js:270
6:19:17 PM:     [repo]/[webpack]/lib/NormalModuleFactory.js:270:22
6:19:17 PM:   - NormalModuleFactory.js:434
6:19:17 PM:     [repo]/[webpack]/lib/NormalModuleFactory.js:434:22
6:19:17 PM:   - NormalModuleFactory.js:116
6:19:17 PM:     [repo]/[webpack]/lib/NormalModuleFactory.js:116:11
6:19:17 PM:   - NormalModuleFactory.js:670
6:19:17 PM:     [repo]/[webpack]/lib/NormalModuleFactory.js:670:25
6:19:17 PM:   - NormalModuleFactory.js:855
6:19:17 PM:     [repo]/[webpack]/lib/NormalModuleFactory.js:855:8
6:19:17 PM:   - NormalModuleFactory.js:975
6:19:17 PM:     [repo]/[webpack]/lib/NormalModuleFactory.js:975:5
6:19:17 PM:   - child-compiler.js:169
6:19:17 PM:     [repo]/[html-webpack-plugin]/lib/child-compiler.js:169:18
6:19:17 PM:   - Compiler.js:551 finalCallback
6:19:17 PM:     [repo]/[webpack]/lib/Compiler.js:551:5
6:19:17 PM:   - Compiler.js:577
6:19:17 PM:     [repo]/[webpack]/lib/Compiler.js:577:11
6:19:17 PM:   - Compiler.js:1196
6:19:17 PM:     [repo]/[webpack]/lib/Compiler.js:1196:17
6:19:17 PM:   - task_queues:96 processTicksAndRejections
6:19:17 PM:     node:internal/process/task_queues:96:5
6:19:17 PM: 
6:19:17 PM: 1 ERROR in child compilations (Use 'stats.children: true' resp. '--stats-children' for more details)
6:19:17 PM: webpack compiled with 5 errors and 1 warning
6:19:17 PM: No issues found.
6:19:18 PM: Failed to compile.
6:19:18 PM: 
6:19:18 PM: Error: ENOENT: no such file or directory, open '/opt/build/repo/node_modules/ansi-html-community/index.js'
6:19:18 PM: LOG from webpack.FileSystemInfo
6:19:18 PM: <w> Managed item /opt/build/repo/node_modules/react-refresh isn't a directory or doesn't contain a package.json (see snapshot.managedPaths option)
6:19:18 PM: + 8 hidden lines
6:19:18 PM: WARNING in [eslint]
6:19:18 PM: src/components/Home Page/HomePage.js
6:19:18 PM:   Line 11:10:  'graphData' is assigned a value but never used                                                                            no-unused-vars
6:19:18 PM:   Line 72:11:  'chart' is assigned a value but never used                                                                                no-unused-vars
6:19:18 PM:   Line 76:6:   React Hook useEffect has a missing dependency: 'fetchInterestOverTime'. Either include it or remove the dependency array  react-hooks/exhaustive-deps
6:19:18 PM:   Line 89:6:   React Hook useEffect has a missing dependency: 'fetchData'. Either include it or remove the dependency array              react-hooks/exhaustive-deps
6:19:18 PM: ERROR in ./node_modules/ansi-html-community/index.js
6:19:18 PM: Module build failed (from ./node_modules/source-map-loader/dist/cjs.js):
6:19:18 PM: Error: ENOENT: no such file or directory, open '/opt/build/repo/node_modules/ansi-html-community/index.js'
6:19:18 PM: ERROR in ./node_modules/core-js-pure/features/global-this.js
6:19:18 PM: Module build failed (from ./node_modules/source-map-loader/dist/cjs.js):
6:19:18 PM: Error: ENOENT: no such file or directory, open '/opt/build/repo/node_modules/core-js-pure/features/global-this.js'
6:19:18 PM: ERROR in ./node_modules/react-refresh/runtime.js
6:19:18 PM: Module build failed (from ./node_modules/source-map-loader/dist/cjs.js):
6:19:18 PM: Error: ENOENT: no such file or directory, open '/opt/build/repo/node_modules/react-refresh/runtime.js'
6:19:18 PM: ERROR in main
6:19:18 PM: Module not found: Error: Can't resolve '/opt/build/repo/src/index.js' in '/opt/build/repo'
6:19:18 PM: ERROR in   Error: Child compilation failed:
6:19:18 PM:   Module not found: Error: Can't resolve '/opt/build/repo/public/index.html' in   '/opt/build/repo'  ModuleNotFoundError: Module not found: Error: Can't resolve '/opt/build/repo/p  ublic/index.html' in '/opt/build/repo'      at /opt/build/repo/node_modules/webpack/lib/Compilation.js:2016:28
6:19:18 PM:       at /opt/build/repo/node_modules/webpack/lib/NormalModuleFactory.js:798:13
6:19:18 PM:       at eval (eval at create (/opt/build/repo/node_modules/tapable/lib/HookCode  Factory.js:33:10), <anonymous>:10:1)
6:19:18 PM:       at /opt/build/repo/node_modules/webpack/lib/NormalModuleFactory.js:270:22
6:19:18 PM:       at eval (eval at create (/opt/build/repo/node_modules/tapable/lib/HookCode  Factory.js:33:10), <anonymous>:9:1)
6:19:18 PM:       at /opt/build/repo/node_modules/webpack/lib/NormalModuleFactory.js:434:22
6:19:18 PM:       at /opt/build/repo/node_modules/webpack/lib/NormalModuleFactory.js:116:11
6:19:18 PM:       at /opt/build/repo/node_modules/webpack/lib/NormalModuleFactory.js:670:25
6:19:18 PM:       at /opt/build/repo/node_modules/webpack/lib/NormalModuleFactory.js:855:8
6:19:18 PM:       at /opt/build/repo/node_modules/webpack/lib/NormalModuleFactory.js:975:5
6:19:18 PM:   - Compilation.js:2016
6:19:18 PM:     [repo]/[webpack]/lib/Compilation.js:2016:28
6:19:18 PM:   - NormalModuleFactory.js:798
6:19:18 PM:     [repo]/[webpack]/lib/NormalModuleFactory.js:798:13
6:19:18 PM:   - NormalModuleFactory.js:270
6:19:18 PM:     [repo]/[webpack]/lib/NormalModuleFactory.js:270:22
6:19:18 PM:   - NormalModuleFactory.js:434
6:19:18 PM:     [repo]/[webpack]/lib/NormalModuleFactory.js:434:22
6:19:18 PM:   - NormalModuleFactory.js:116
6:19:18 PM:     [repo]/[webpack]/lib/NormalModuleFactory.js:116:11
6:19:18 PM:   - NormalModuleFactory.js:670
6:19:18 PM:     [repo]/[webpack]/lib/NormalModuleFactory.js:670:25
6:19:18 PM:   - NormalModuleFactory.js:855
6:19:18 PM:     [repo]/[webpack]/lib/NormalModuleFactory.js:855:8
6:19:18 PM:   - NormalModuleFactory.js:975
6:19:18 PM:     [repo]/[webpack]/lib/NormalModuleFactory.js:975:5
6:19:18 PM:   - child-compiler.js:169
6:19:18 PM:     [repo]/[html-webpack-plugin]/lib/child-compiler.js:169:18
6:19:18 PM:   - Compiler.js:551 finalCallback
6:19:18 PM:     [repo]/[webpack]/lib/Compiler.js:551:5
6:19:18 PM:   - Compiler.js:577
6:19:18 PM:     [repo]/[webpack]/lib/Compiler.js:577:11
6:19:18 PM:   - Compiler.js:1196
6:19:18 PM:     [repo]/[webpack]/lib/Compiler.js:1196:17
6:19:18 PM:   - task_queues:96 processTicksAndRejections
6:19:18 PM:     node:internal/process/task_queues:96:5
6:19:18 PM: 
6:19:18 PM: webpack compiled with 5 errors and 1 warning
6:19:18 PM: No issues found.
6:19:19 PM: Failed to compile.
6:19:19 PM: 
6:19:19 PM: Error: ENOENT: no such file or directory, open '/opt/build/repo/node_modules/ansi-html-community/index.js'
6:19:19 PM: LOG from webpack.FileSystemInfo
6:19:19 PM: <w> Managed item /opt/build/repo/node_modules/@pmmmwh/react-refresh-webpack-plugin isn't a directory or doesn't contain a package.json (see snapshot.managedPaths option)
6:19:19 PM: + 13 hidden lines
6:19:19 PM: WARNING in [eslint]
6:19:19 PM: src/components/Home Page/HomePage.js
6:19:19 PM:   Line 11:10:  'graphData' is assigned a value but never used                                                                            no-unused-vars
6:19:19 PM:   Line 72:11:  'chart' is assigned a value but never used                                                                                no-unused-vars
6:19:19 PM:   Line 76:6:   React Hook useEffect has a missing dependency: 'fetchInterestOverTime'. Either include it or remove the dependency array  react-hooks/exhaustive-deps
6:19:19 PM:   Line 89:6:   React Hook useEffect has a missing dependency: 'fetchData'. Either include it or remove the dependency array              react-hooks/exhaustive-deps
6:19:19 PM: ERROR in ./node_modules/ansi-html-community/index.js
6:19:19 PM: Module build failed (from ./node_modules/source-map-loader/dist/cjs.js):
6:19:19 PM: Error: ENOENT: no such file or directory, open '/opt/build/repo/node_modules/ansi-html-community/index.js'
6:19:19 PM: ERROR in Module not found: Error: Can't resolve '/opt/build/repo/node_modules/@pmmmwh/react-refresh-webpack-plugin/client/ReactRefreshEntry.js' in '/opt/build/repo'
6:19:19 PM: ERROR in main
6:19:19 PM: Module not found: Error: Can't resolve '/opt/build/repo/src/index.js' in '/opt/build/repo'
6:19:19 PM: ERROR in   Error: Child compilation failed:
6:19:19 PM:   Module not found: Error: Can't resolve '/opt/build/repo/public/index.html' in   '/opt/build/repo'  ModuleNotFoundError: Module not found: Error: Can't resolve '/opt/build/repo/p  ublic/index.html' in '/opt/build/repo'      at /opt/build/repo/node_modules/webpack/lib/Compilation.js:2016:28
6:19:19 PM:       at /opt/build/repo/node_modules/webpack/lib/NormalModuleFactory.js:798:13
6:19:19 PM:       at eval (eval at create (/opt/build/repo/node_modules/tapable/lib/HookCode  Factory.js:33:10), <anonymous>:10:1)
6:19:19 PM:       at /opt/build/repo/node_modules/webpack/lib/NormalModuleFactory.js:270:22
6:19:19 PM:       at eval (eval at create (/opt/build/repo/node_modules/tapable/lib/HookCode  Factory.js:33:10), <anonymous>:9:1)
6:19:19 PM:       at /opt/build/repo/node_modules/webpack/lib/NormalModuleFactory.js:434:22
6:19:19 PM:       at /opt/build/repo/node_modules/webpack/lib/NormalModuleFactory.js:116:11
6:19:19 PM:       at /opt/build/repo/node_modules/webpack/lib/NormalModuleFactory.js:670:25
6:19:19 PM:       at /opt/build/repo/node_modules/webpack/lib/NormalModuleFactory.js:855:8
6:19:19 PM:       at /opt/build/repo/node_modules/webpack/lib/NormalModuleFactory.js:975:5
6:19:19 PM:   - Compilation.js:2016
6:19:19 PM:     [repo]/[webpack]/lib/Compilation.js:2016:28
6:19:19 PM:   - NormalModuleFactory.js:798
6:19:19 PM:     [repo]/[webpack]/lib/NormalModuleFactory.js:798:13
6:19:19 PM:   - NormalModuleFactory.js:270
6:19:19 PM:     [repo]/[webpack]/lib/NormalModuleFactory.js:270:22
6:19:19 PM:   - NormalModuleFactory.js:434
6:19:19 PM:     [repo]/[webpack]/lib/NormalModuleFactory.js:434:22
6:19:19 PM:   - NormalModuleFactory.js:116
6:19:19 PM:     [repo]/[webpack]/lib/NormalModuleFactory.js:116:11
6:19:19 PM:   - NormalModuleFactory.js:670
6:19:19 PM:     [repo]/[webpack]/lib/NormalModuleFactory.js:670:25
6:19:19 PM:   - NormalModuleFactory.js:855
6:19:19 PM:     [repo]/[webpack]/lib/NormalModuleFactory.js:855:8
6:19:19 PM:   - NormalModuleFactory.js:975
6:19:19 PM:     [repo]/[webpack]/lib/NormalModuleFactory.js:975:5
6:19:19 PM:   - child-compiler.js:169
6:19:19 PM:     [repo]/[html-webpack-plugin]/lib/child-compiler.js:169:18
6:19:19 PM:   - Compiler.js:551 finalCallback
6:19:19 PM:     [repo]/[webpack]/lib/Compiler.js:551:5
6:19:19 PM:   - Compiler.js:577
6:19:19 PM:     [repo]/[webpack]/lib/Compiler.js:577:11
6:19:19 PM:   - Compiler.js:1196
6:19:19 PM:     [repo]/[webpack]/lib/Compiler.js:1196:17
6:19:19 PM:   - task_queues:96 processTicksAndRejections
6:19:19 PM:     node:internal/process/task_queues:96:5
6:19:19 PM: 
6:19:19 PM: webpack compiled with 4 errors and 1 warning
6:19:19 PM: No issues found.
6:19:19 PM: Failed to compile.
6:19:19 PM: 
6:19:19 PM: Module not found: Error: Can't resolve '/opt/build/repo/node_modules/@pmmmwh/react-refresh-webpack-plugin/client/ReactRefreshEntry.js' in '/opt/build/repo'LOG from webpack.FileSystemInfo
6:19:19 PM: <w> Managed item /opt/build/repo/node_modules/webpack-dev-server isn't a directory or doesn't contain a package.json (see snapshot.managedPaths option)
6:19:19 PM: + 11 hidden lines
6:19:19 PM: WARNING in [eslint]
6:19:19 PM: src/components/Home Page/HomePage.js
6:19:19 PM:   Line 11:10:  'graphData' is assigned a value but never used                                                                            no-unused-vars
6:19:19 PM:   Line 72:11:  'chart' is assigned a value but never used                                                                                no-unused-vars
6:19:19 PM:   Line 76:6:   React Hook useEffect has a missing dependency: 'fetchInterestOverTime'. Either include it or remove the dependency array  react-hooks/exhaustive-deps
6:19:19 PM:   Line 89:6:   React Hook useEffect has a missing dependency: 'fetchData'. Either include it or remove the dependency array              react-hooks/exhaustive-deps
6:19:19 PM: ERROR in Module not found: Error: Can't resolve '/opt/build/repo/node_modules/@pmmmwh/react-refresh-webpack-plugin/client/ReactRefreshEntry.js' in '/opt/build/repo'
6:19:19 PM: ERROR in Module not found: Error: Can't resolve '/opt/build/repo/node_modules/webpack-dev-server/client/index.js?protocol=ws%3A&hostname=0.0.0.0&port=3000&pathname=%2Fws&logging=none&overlay=%7B%22errors%22%3Atrue%2C%22warnings%22%3Afalse%7D&reconnect=10&hot=true&live-reload=true' in '/opt/build/repo'
6:19:19 PM: ERROR in main
6:19:19 PM: Module not found: Error: Can't resolve '/opt/build/repo/src/index.js' in '/opt/build/repo'
6:19:19 PM: ERROR in   Error: Child compilation failed:
6:19:19 PM:   Module not found: Error: Can't resolve '/opt/build/repo/public/index.html' in   '/opt/build/repo'  ModuleNotFoundError: Module not found: Error: Can't resolve '/opt/build/repo/p  ublic/index.html' in '/opt/build/repo'      at /opt/build/repo/node_modules/webpack/lib/Compilation.js:2016:28
6:19:19 PM:       at /opt/build/repo/node_modules/webpack/lib/NormalModuleFactory.js:798:13
6:19:19 PM:       at eval (eval at create (/opt/build/repo/node_modules/tapable/lib/HookCode  Factory.js:33:10), <anonymous>:10:1)
6:19:19 PM:       at /opt/build/repo/node_modules/webpack/lib/NormalModuleFactory.js:270:22
6:19:19 PM:       at eval (eval at create (/opt/build/repo/node_modules/tapable/lib/HookCode  Factory.js:33:10), <anonymous>:9:1)
6:19:19 PM:       at /opt/build/repo/node_modules/webpack/lib/NormalModuleFactory.js:434:22
6:19:19 PM:       at /opt/build/repo/node_modules/webpack/lib/NormalModuleFactory.js:116:11
6:19:19 PM:       at /opt/build/repo/node_modules/webpack/lib/NormalModuleFactory.js:670:25
6:19:19 PM:       at /opt/build/repo/node_modules/webpack/lib/NormalModuleFactory.js:855:8
6:19:19 PM:       at /opt/build/repo/node_modules/webpack/lib/NormalModuleFactory.js:975:5
6:19:19 PM:   - Compilation.js:2016
6:19:19 PM:     [repo]/[webpack]/lib/Compilation.js:2016:28
6:19:19 PM:   - NormalModuleFactory.js:798
6:19:19 PM:     [repo]/[webpack]/lib/NormalModuleFactory.js:798:13
6:19:19 PM:   - NormalModuleFactory.js:270
6:19:19 PM:     [repo]/[webpack]/lib/NormalModuleFactory.js:270:22
6:19:19 PM:   - NormalModuleFactory.js:434
6:19:19 PM:     [repo]/[webpack]/lib/NormalModuleFactory.js:434:22
6:19:19 PM:   - NormalModuleFactory.js:116
6:19:19 PM:     [repo]/[webpack]/lib/NormalModuleFactory.js:116:11
6:19:19 PM:   - NormalModuleFactory.js:670
6:19:19 PM:     [repo]/[webpack]/lib/NormalModuleFactory.js:670:25
6:19:19 PM:   - NormalModuleFactory.js:855
6:19:19 PM:     [repo]/[webpack]/lib/NormalModuleFactory.js:855:8
6:19:19 PM:   - NormalModuleFactory.js:975
6:19:19 PM:     [repo]/[webpack]/lib/NormalModuleFactory.js:975:5
6:19:19 PM:   - child-compiler.js:169
6:19:19 PM:     [repo]/[html-webpack-plugin]/lib/child-compiler.js:169:18
6:19:19 PM:   - Compiler.js:551 finalCallback
6:19:19 PM:     [repo]/[webpack]/lib/Compiler.js:551:5
6:19:19 PM:   - Compiler.js:577
6:19:19 PM:     [repo]/[webpack]/lib/Compiler.js:577:11
6:19:19 PM:   - Compiler.js:1196
6:19:19 PM:     [repo]/[webpack]/lib/Compiler.js:1196:17
6:19:19 PM:   - task_queues:96 processTicksAndRejections
6:19:19 PM:     node:internal/process/task_queues:96:5
6:19:19 PM: 
6:19:19 PM: webpack compiled with 4 errors and 1 warning
6:19:19 PM: No issues found.
6:19:19 PM: Failed to compile.
6:19:19 PM: 
6:19:19 PM: Module not found: Error: Can't resolve '/opt/build/repo/node_modules/@pmmmwh/react-refresh-webpack-plugin/client/ReactRefreshEntry.js' in '/opt/build/repo'WARNING in [eslint]
6:19:19 PM: src/components/Home Page/HomePage.js
6:19:19 PM:   Line 11:10:  'graphData' is assigned a value but never used                                                                            no-unused-vars
6:19:19 PM:   Line 72:11:  'chart' is assigned a value but never used                                                                                no-unused-vars
6:19:19 PM:   Line 76:6:   React Hook useEffect has a missing dependency: 'fetchInterestOverTime'. Either include it or remove the dependency array  react-hooks/exhaustive-deps
6:19:19 PM:   Line 89:6:   React Hook useEffect has a missing dependency: 'fetchData'. Either include it or remove the dependency array              react-hooks/exhaustive-deps
6:19:19 PM: ERROR in Module not found: Error: Can't resolve '/opt/build/repo/node_modules/@pmmmwh/react-refresh-webpack-plugin/client/ReactRefreshEntry.js' in '/opt/build/repo'
6:19:19 PM: ERROR in Module not found: Error: Can't resolve '/opt/build/repo/node_modules/webpack-dev-server/client/index.js?protocol=ws%3A&hostname=0.0.0.0&port=3000&pathname=%2Fws&logging=none&overlay=%7B%22errors%22%3Atrue%2C%22warnings%22%3Afalse%7D&reconnect=10&hot=true&live-reload=true' in '/opt/build/repo'
6:19:19 PM: ERROR in Module not found: Error: Can't resolve '/opt/build/repo/node_modules/webpack/hot/dev-server.js' in '/opt/build/repo'
6:19:19 PM: ERROR in main
6:19:19 PM: Module not found: Error: Can't resolve '/opt/build/repo/src/index.js' in '/opt/build/repo'
6:19:19 PM: ERROR in   Error: Child compilation failed:
6:19:19 PM:   Module not found: Error: Can't resolve '/opt/build/repo/public/index.html' in   '/opt/build/repo'  ModuleNotFoundError: Module not found: Error: Can't resolve '/opt/build/repo/p  ublic/index.html' in '/opt/build/repo'      at /opt/build/repo/node_modules/webpack/lib/Compilation.js:2016:28
6:19:19 PM:       at /opt/build/repo/node_modules/webpack/lib/NormalModuleFactory.js:798:13
6:19:19 PM:       at eval (eval at create (/opt/build/repo/node_modules/tapable/lib/HookCode  Factory.js:33:10), <anonymous>:10:1)
6:19:19 PM:       at /opt/build/repo/node_modules/webpack/lib/NormalModuleFactory.js:270:22
6:19:19 PM:       at eval (eval at create (/opt/build/repo/node_modules/tapable/lib/HookCode  Factory.js:33:10), <anonymous>:9:1)
6:19:19 PM:       at /opt/build/repo/node_modules/webpack/lib/NormalModuleFactory.js:434:22
6:19:19 PM:       at /opt/build/repo/node_modules/webpack/lib/NormalModuleFactory.js:120:11
6:19:19 PM:       at /opt/build/repo/node_modules/webpack/lib/NormalModuleFactory.js:670:25
6:19:19 PM:       at /opt/build/repo/node_modules/webpack/lib/NormalModuleFactory.js:855:8
6:19:19 PM:       at /opt/build/repo/node_modules/webpack/lib/NormalModuleFactory.js:975:5
6:19:19 PM:   - Compilation.js:2016
6:19:19 PM:     [repo]/[webpack]/lib/Compilation.js:2016:28
6:19:19 PM:   - NormalModuleFactory.js:798
6:19:19 PM:     [repo]/[webpack]/lib/NormalModuleFactory.js:798:13
6:19:19 PM:   - NormalModuleFactory.js:270
6:19:19 PM:     [repo]/[webpack]/lib/NormalModuleFactory.js:270:22
6:19:19 PM:   - NormalModuleFactory.js:434
6:19:19 PM:     [repo]/[webpack]/lib/NormalModuleFactory.js:434:22
6:19:19 PM:   - NormalModuleFactory.js:120
6:19:19 PM:     [repo]/[webpack]/lib/NormalModuleFactory.js:120:11
6:19:19 PM:   - NormalModuleFactory.js:670
6:19:19 PM:     [repo]/[webpack]/lib/NormalModuleFactory.js:670:25
6:19:19 PM:   - NormalModuleFactory.js:855
6:19:19 PM:     [repo]/[webpack]/lib/NormalModuleFactory.js:855:8
6:19:19 PM:   - NormalModuleFactory.js:975
6:19:19 PM:     [repo]/[webpack]/lib/NormalModuleFactory.js:975:5
6:19:19 PM:   - child-compiler.js:169
6:19:19 PM:     [repo]/[html-webpack-plugin]/lib/child-compiler.js:169:18
6:19:19 PM:   - Compiler.js:551 finalCallback
6:19:19 PM:     [repo]/[webpack]/lib/Compiler.js:551:5
6:19:19 PM:   - Compiler.js:577
6:19:19 PM:     [repo]/[webpack]/lib/Compiler.js:577:11
6:19:19 PM:   - Compiler.js:1196
6:19:19 PM:     [repo]/[webpack]/lib/Compiler.js:1196:17
6:19:19 PM:   - runMicrotasks
6:19:19 PM:   - task_queues:96 processTicksAndRejections
6:19:19 PM:     node:internal/process/task_queues:96:5
6:19:19 PM: 
6:19:19 PM: 1 ERROR in child compilations (Use 'stats.children: true' resp. '--stats-children' for more details)
6:19:19 PM: webpack compiled with 6 errors and 1 warning
6:19:19 PM: No issues found.
6:20:19 PM: /opt/build/repo/node_modules/react-scripts/scripts/start.js:19
6:20:19 PM:   throw err;
6:20:19 PM:   ^
6:20:19 PM: [Error: ENOENT: no such file or directory, stat '/opt/build/repo/node_modules/.cache/default-development/0.pack'] {
6:20:19 PM:   errno: -2,
6:20:19 PM:   code: 'ENOENT',
6:20:19 PM:   syscall: 'stat',
6:20:19 PM:   path: '/opt/build/repo/node_modules/.cache/default-development/0.pack'
6:20:19 PM: }
6:20:19 PM: ◈ Command failed with exit code 1: npm run start. Shutting down Netlify Dev server (https://ntl.fyi/exit-code-1)
6:20:19 PM: Execution timed out after 36m59.604125322s
6:20:19 PM: Error running command: Command did not finish within the time limit
6:20:19 PM: Failing build: Failed to build site
6:20:19 PM: Finished processing build request in 37m1.457524532s

Hey there, @lieudusty123 :wave:

Thanks so much for reaching out! Can you share the URL to the site you are working on? This would help us look at the specifics.

hey, this is the link: https://strong-rabanadas-ea3696.netlify.app

However, the site is not up because the build failed.

Hi @lieudusty123

The log from your original post, is that a build log from Netlify—i.e. you are deploying to Netlify from git? If so, I’m curious to why it appears you are running Netlify CLI as evident in the message

Are you able to share the repository you are deploying from?

This doesn’t appear to have anything to do with edge functions as they are only available and only run when the site is built and deployed.

Yes, netlify is deploying from my GitHub repo: GitHub - lieudusty123/ToTrends
from main branch.

Thanks @lieudusty123

CI= "npm run build"

This command from the netlify.toml should read

command = "CI= npm run build"

I tried it and the build still failed. I got this log.

8:28:09 AM: npm WARN config tmp This setting is no longer used.  npm stores temporary files in a special
8:28:09 AM: npm WARN config location in the cache, and they are managed by
8:28:09 AM: npm WARN config     [`cacache`](http://npm.im/cacache).
8:28:09 AM: > my-app@0.1.0 build
8:28:09 AM: > react-scripts build
8:28:10 AM: Creating an optimized production build...
8:28:22 AM: 
8:28:22 AM: Treating warnings as errors because process.env.CI = true.
8:28:22 AM: Most CI servers set it automatically.
8:28:22 AM: 
8:28:22 AM: Failed to compile.
8:28:22 AM: 
8:28:22 AM: [eslint]
8:28:22 AM: src/components/Home Page/HomePage.js
8:28:22 AM:   Line 71:11:  'chart' is assigned a value but never used                                                                                no-unused-vars
8:28:22 AM:   Line 75:6:   React Hook useEffect has a missing dependency: 'fetchInterestOverTime'. Either include it or remove the dependency array  react-hooks/exhaustive-deps
8:28:22 AM:   Line 84:6:   React Hook useEffect has a missing dependency: 'fetchData'. Either include it or remove the dependency array              react-hooks/exhaustive-deps
8:28:22 AM: ​
8:28:22 AM: ────────────────────────────────────────────────────────────────
8:28:22 AM:   "build.command" failed                                        
8:28:22 AM: ────────────────────────────────────────────────────────────────
8:28:22 AM: ​
8:28:22 AM:   Error message
8:28:22 AM:   Command failed with exit code 1: npm run build (https://ntl.fyi/exit-code-1)
8:28:22 AM: ​
8:28:22 AM:   Error location
8:28:22 AM:   In build.command from netlify.toml:
8:28:22 AM:   npm run build
8:28:22 AM: ​
8:28:22 AM:   Resolved config
8:28:22 AM:   build:
8:28:22 AM:     command: npm run build
8:28:22 AM:     commandOrigin: config
8:28:22 AM:     publish: /opt/build/repo/build
8:28:22 AM:     publishOrigin: config
8:28:22 AM:   functionsDirectory: /opt/build/repo/functions
8:28:22 AM: Caching artifacts
8:28:22 AM: Started saving node modules
8:28:22 AM: Finished saving node modules
8:28:22 AM: Started saving build plugins
8:28:23 AM: Creating deploy upload records
8:28:22 AM: Finished saving build plugins
8:28:22 AM: Started saving pip cache
8:28:22 AM: Finished saving pip cache
8:28:22 AM: Started saving emacs cask dependencies
8:28:23 AM: Failed during stage 'building site': Build script returned non-zero exit code: 2 (https://ntl.fyi/exit-code-2)
8:28:22 AM: Finished saving emacs cask dependencies
8:28:22 AM: Started saving maven dependencies
8:28:22 AM: Finished saving maven dependencies
8:28:22 AM: Started saving boot dependencies
8:28:22 AM: Finished saving boot dependencies
8:28:22 AM: Started saving rust rustup cache
8:28:22 AM: Finished saving rust rustup cache
8:28:22 AM: Started saving go dependencies
8:28:22 AM: Finished saving go dependencies
8:28:23 AM: Build failed due to a user error: Build script returned non-zero exit code: 2
8:28:23 AM: Failing build: Failed to build site
8:28:23 AM: Finished processing build request in 1m0.426036502s

The above message explains what is happening, and why. Below is where it is happening

You have two choice:

  • Fix the issues identified above; or
  • Change the command to CI= npm run build in the netlify.toml and ignore the warnings.
1 Like

It worked! thank you so much :slight_smile:

1 Like