Giter VIP home page Giter VIP logo

Comments (8)

brillout avatar brillout commented on May 25, 2024

Insert the following before line 90 of /home/wulf/projekte/bati/my-app/node_modules/.pnpm/[email protected][email protected]/node_modules/vike/dist/esm/node/plugin/shared/getFilePath.js and report back. (It seems to be a Windows issue but I don't have a Windows setup atm.)

+ console.log('filePathAbsoluteFilesystem', filePathAbsoluteFilesystem);
+ console.log('userRootDir', userRootDir);
+ console.log('filePathRelative', filePathRelative);    
    assert(!filePathRelative.startsWith('.') && !filePathRelative.startsWith('/'));

from vike.

WulfP avatar WulfP commented on May 25, 2024

Thanks for this super fast response!

I don´t expect a Windows-issue. WSL is the "Windows subsystem for Linux" and provides a native Linux-VM including original Filesystem similar to what you get inside a docker container. So the developement is done in Ubuntu 22.04.

After inserting the thee new commands I see this log between server start end error exit:

Server listening on http://localhost:3000
filePathAbsoluteFilesystem /home/wulf/projekte/bati/my-app/.history/pages/index/+Page_20240402105314.vue
userRootDir /home/wulf/projekte/bati/my-app
filePathRelative .history/pages/index/+Page_20240402105314.vue
Error: [[email protected]][Bug] You stumbled upon a Vike bug. Go to https://github.com/vikejs/vike/issues/new and copy-paste this error. A maintainer will fix the bug (usually under 24 hours).
    at getFilePathAbsoluteUserRootDir (file:///home/wulf/projekte/bati/my-app/node_modules/.pnpm/[email protected][email protected]/node_modules/vike/dist/esm/node/plugin/shared/getFilePath.js:93:5)
    at getFilePathResolved (file:///home/wulf/projekte/bati/my-app/node_modules/.pnpm/[email protected][email protected]/node_modules/vike/dist/esm/node/plugin/shared/getFilePath.js:18:39)
    at reloadConfig (file:///home/wulf/projekte/bati/my-app/node_modules/.pnpm/[email protected][email protected]/node_modules/vike/dist/esm/node/plugin/plugins/importUserCode/index.js:122:50)
    at listener (file:///home/wulf/projekte/bati/my-app/node_modules/.pnpm/[email protected][email protected]/node_modules/vike/dist/esm/node/plugin/plugins/importUserCode/index.js:77:13)
    at FSWatcher.<anonymous> (file:///home/wulf/projekte/bati/my-app/node_modules/.pnpm/[email protected][email protected]/node_modules/vike/dist/esm/node/plugin/plugins/importUserCode/index.js:66:50)
    at FSWatcher.emit (node:events:525:35)
    at FSWatcher.emit (node:domain:489:12)
    at FSWatcher.emitWithAll (file:///home/wulf/projekte/bati/my-app/node_modules/.pnpm/[email protected]/node_modules/vite/dist/node/chunks/dep-C-KAszbv.js:45880:8)
    at FSWatcher._emit (file:///home/wulf/projekte/bati/my-app/node_modules/.pnpm/[email protected]/node_modules/vite/dist/node/chunks/dep-C-KAszbv.js:45972:8)
    at NodeFsHandler._handleFile (file:///home/wulf/projekte/bati/my-app/node_modules/.pnpm/[email protected]/node_modules/vite/dist/node/chunks/dep-C-KAszbv.js:44557:14)
    at NodeFsHandler._addToNodeFs (file:///home/wulf/projekte/bati/my-app/node_modules/.pnpm/[email protected]/node_modules/vite/dist/node/chunks/dep-C-KAszbv.js:44794:21)
 ELIFECYCLE  Command failed with exit code 1.

Same behaviour with a fresh install under node v20.9.0.

from vike.

brillout avatar brillout commented on May 25, 2024

Indeed, it isn't a Windows issue.

What is the .history/ directory and the +Page_20240402105314.vue file? Is that a Tailwind thing?

from vike.

brillout avatar brillout commented on May 25, 2024

line 90 of /home/wulf/projekte/bati/my-app/node_modules/.pnpm/[email protected][email protected]/node_modules/vike/dist/esm/node/plugin/shared/getFilePath.js

If you remove the assertion assert(!filePathRelative.startsWith('.') && !filePathRelative.startsWith('/')); does it work then?

from vike.

WulfP avatar WulfP commented on May 25, 2024

Bingo! That´s it. No issues anymore after removing the assertion!
Great work! I did not notice .history in the error message.

.history is created by VS-Code local history plugin and should not be included.

But expect this to be present on many machines. It can be extremely useful even if git is active.

After removing .history and editing +Page.vue with another editor, HMR was working fine.

I investigated if adding .history to .gitignore helps. Some tools respect these entries.
But here it did not show any effect. HMR still crashed the dev-server.

So it should be possible to restrict the directories that were parsed during HMR, right?

from vike.

brillout avatar brillout commented on May 25, 2024

Fix pre-released as [email protected].

adding .history to .gitignore

That should actually make Vike ignore .history.

Related: #1593.

Let me know if you still run into issues.

In case that's something your company be up for, we're looking for sponsors — it makes a massive difference.

from vike.

WulfP avatar WulfP commented on May 25, 2024

Thank your for your quick help!

I will continue to evaluate vike and see if we can use it for our project.
Currently our company is a bit too far away from break even to think about sponsoring.
But I will keep it in mind!

Btw: Grüße in die alte Heimat!

from vike.

brillout avatar brillout commented on May 25, 2024

Makes sense and thanks for circling back on this.

Grüße zurück :)

from vike.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.