You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have the default next.js app, from the tutorial, and I want to host it on firebase, I did firebase init hosting, and everything worked, but then I wanted to add github in between, so I ran firebase init hosting:github, configured it with running the npm run build only. When the script starts running on github it gives me an error that the command next was not found.
And yes, I installed specifically node, next using npm inside of the app folder.
Also I tried removing the node_modules and adding it again, but nothing seem to work/nor change anything inside the app.
The error:
Run npm run build
build
next build
sh: 1: next: not found
Error: Process completed with exit code 127.
Also when tried running npx next run it gives this error:
Invalid project directory provided, no such directory: app_folder/run
I want it to be hosted on Google as it is for a school project, and teacher wants it to be firebase.
Current vs. Expected behavior
Dropping weird errors, while it should just deploy the site, the rest of the script works all good.
Verify canary release
I verified that the issue exists in the latest Next.js canary release
Also, when i try using the commands npm ci && npm run build it gives me weird error:
Build error occurred
ReferenceError: window is not defined
at getOrCreateDataLayer (file:///home/runner/work/CookBook/CookBook/node_modules/@firebase/analytics/dist/esm/index.esm2017.js:177:23)
at factory (file:///home/runner/work/CookBook/CookBook/node_modules/@firebase/analytics/dist/esm/index.esm2017.js:1038:9)
at Component.instanceFactory (file:///home/runner/work/CookBook/CookBook/node_modules/@firebase/analytics/dist/esm/index.esm2017.js:1245:16)
at Provider.getOrInitializeService (file:///home/runner/work/CookBook/CookBook/node_modules/@firebase/component/dist/esm/index.esm2017.js:290:39)
at Provider.initialize (file:///home/runner/work/CookBook/CookBook/node_modules/@firebase/component/dist/esm/index.esm2017.js:234:31)
at initializeAnalytics (file:///home/runner/work/CookBook/CookBook/node_modules/@firebase/analytics/dist/esm/index.esm2017.js:1087:49)
at getAnalytics (file:///home/runner/work/CookBook/CookBook/node_modules/@firebase/analytics/dist/esm/index.esm2017.js:1066:12)
at /home/runner/work/CookBook/CookBook/.next/server/pages/index.js:1:1935
Error: Failed to collect page data for /
at /home/runner/work/CookBook/CookBook/node_modules/next/dist/build/utils.js:1217:15 ***
type: 'Error'
This issue has been automatically marked as stale due to two years of inactivity. It will be closed in 7 days unless there’s further input. If you believe this issue is still relevant, please leave a comment or provide updated details. Thank you.
This issue has been automatically closed due to two years of inactivity. If you’re still experiencing a similar problem or have additional details to share, please open a new issue following our current issue template. Your updated report helps us investigate and address concerns more efficiently. Thank you for your understanding!
Link to the code that reproduces this issue
https://github.com/Vojteggg/CookBook
To Reproduce
I have the default next.js app, from the tutorial, and I want to host it on firebase, I did firebase init hosting, and everything worked, but then I wanted to add github in between, so I ran firebase init hosting:github, configured it with running the npm run build only. When the script starts running on github it gives me an error that the command next was not found.
And yes, I installed specifically node, next using npm inside of the app folder.
Also I tried removing the node_modules and adding it again, but nothing seem to work/nor change anything inside the app.
The error:
Run npm run build
build
next build
sh: 1: next: not found
Error: Process completed with exit code 127.
Also when tried running npx next run it gives this error:
Invalid project directory provided, no such directory: app_folder/run
I want it to be hosted on Google as it is for a school project, and teacher wants it to be firebase.
Current vs. Expected behavior
Dropping weird errors, while it should just deploy the site, the rest of the script works all good.
Verify canary release
Provide environment information
Operating System: Platform: darwin Arch: x64 Version: Darwin Kernel Version 23.0.0: Fri Sep 15 14:42:42 PDT 2023; root:xnu-10002.1.13~1/RELEASE_X86_64 Binaries: Node: 21.1.0 npm: 9.6.7 Yarn: N/A pnpm: N/A Relevant Packages: next: 14.0.3 eslint-config-next: N/A react: 18.2.0 react-dom: 18.2.0 typescript: N/A Next.js Config: output: N/A
Which area(s) are affected? (Select all that apply)
Not sure
Additional context
No response
The text was updated successfully, but these errors were encountered: