window is not defined
See original GitHub issuerepo
https://github.com/calibur-tv/arthur
step
clone repo
yarn install
yarn workspace core build
error message
yarn workspace core build
[vite-ssg] Build for client...
vite v2.0.2 building for production...
✓ 18 modules transformed.
dist/index.html 0.47kb
dist/ssr-manifest.json 1.45kb
dist/assets/index.84deefdb.js 0.14kb / brotli: 0.11kb
dist/assets/about.b281ebe7.js 0.14kb / brotli: 0.10kb
dist/assets/app.63e62a7a.css 0.16kb / brotli: 0.10kb
dist/assets/app.6e05f1be.js 2.13kb / brotli: 1.01kb
dist/assets/vendor.a9bc8345.js 68.26kb / brotli: 23.85kb
[vite-ssg] Build for server...
vite v2.0.2 building SSR bundle for production...
✓ 6 modules transformed.
.vite-ssg-temp/main.js 4.08kb
.vite-ssg-temp/assets/style.20813ca4.css 0.20kb
ReferenceError: window is not defined
at useHistoryStateNavigation (/Users/yuistack/Documents/calibur/arthur/node_modules/vue-router/dist/vue-router.cjs.js:501:35)
at Object.createWebHistory (/Users/yuistack/Documents/calibur/arthur/node_modules/vue-router/dist/vue-router.cjs.js:593:31)
at Module.<anonymous> (/Users/yuistack/Documents/calibur/arthur/packages/core/.vite-ssg-temp/main.js:65:22)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
at build (/Users/yuistack/Documents/calibur/arthur/node_modules/vite-ssg/dist/node/cli.js:134:23)
system info
- node:v14.15.1
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
How to solve "window is not defined" errors in React and Next.js
Because in the Node.js world, window is not defined, window is only available in browsers. There are three ways to solve that: 1....
Read more >How to solve Next.js window is not defined
ReferenceError : window is not defined is a pretty common error you may run into when using Next.js for the first time but...
Read more >Javascript: 'window' is not defined - Stack Overflow
The window object represents an open window in a browser. Since you are not running your code within a browser, but via Windows...
Read more >referenceerror: window is not defined, how to solve
Here's how to fix the “referenceerror: window is not defined” error that you might have in Node.js or with a tool like Next.js....
Read more >How To Solve ReferenceError window is not defined in ...
Fixing a window is not defined error can be quite simple. In most cases, all you will need to do is wrap your...
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
https://www.github.com/calibur-tv/arthur/tree/main/packages%2Fcore%2Fsrc%2Froute%2Findex.js
thanks, but the problem is solved. it is because I’m trying to using web history on routeOptions even though the default of vite-ssg is using web history