bug: npm run build error
See original GitHub issueDescribe the Bug
I installed the adapter, added it to my svelte.config.js
and initialized firebase with firebase init
.
When I run npm run build
I get the following error:
> Error: Required "hosting[].rewrites" field not found for matched hosting configuration. Specify your Cloud Function with rewrite rule matching "source":"**"
TypeError: Error: Required "hosting[].rewrites" field not found for matched hosting configuration. Specify your Cloud Function with rewrite rule matching "source":"**"
at parseFirebaseConfiguration (file:///[project-path]/node_modules/svelte-adapter-firebase/src/utils.js:124:9)
at adapt (file:///[project-path]/node_modules/svelte-adapter-firebase/src/index.js:26:35)
at adapt (file:///[project-path]/alohi/node_modules/@sveltejs/kit/dist/chunks/index4.js:377:8)
at file:///[project-path]/alohi/node_modules/@sveltejs/kit/dist/cli.js:878:11
Steps to Reproduce
- Install sveltekit
- Install adapter
- Create github project
- Initialize firebase
- run
npm run build
Expected Behaviour
I expect the site to build.
svelte-adapter-firebase version
0.13.0
sveltejs/kit version
1.0.0-next.178
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:24 (13 by maintainers)
Top Results From Across the Web
npm run build - fails to compile despite development version ...
I have a react app created with create-react-app , and npm run build is failing to compile a production build. It throws the...
Read more >Execution of "npm run build" causes an error and can not be ...
I purchased Material Dashboard Pro React.(material-dashboard-pro-react@1.2.0) Execution of "npm run build" causes an error and can not be ...
Read more >Common errors | npm Docs
Possible temporary npm registry glitch, or corrupted local server cache. Run npm cache clean and/or try again later. · This can be caused...
Read more >Error when running npm run build : r/react - Reddit
I have a react app done and am attempting to learn how to deploy it for the first time. I type npm run...
Read more >How can i fix npm run build error more efficiently - Support
i ran into error TS2565: Property 'defaultProps' is used before being assigned while “npm run build” OS: WSL2 Ubuntu 18.04 LTS Redash: ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
If I update the
hosting
object to include rewrites, do you have an example of what that function in<functionName>
should look like infunctions/index.js
?I updated it to
and now I’m getting the function in the terminal