Git Product home page Git Product logo

Comments (7)

shaack avatar shaack commented on June 9, 2024

The 'web-module-linker', which is an devDependency is needed for the postinstall.js script. It should work, if you install 'web-module-linker' before as global. The problem is: I don't know how to ensure that the dependency is installed before the postinstall.js is running.

from cm-chessboard.

shaack avatar shaack commented on June 9, 2024

I moved the 'web-module-linker' from devDependency to dependency. (v2.13.7) Does it work now?

from cm-chessboard.

biowaffeln avatar biowaffeln commented on June 9, 2024

Good news: web-module-linker got installed first, so that worked
Bad news: this time I got the following error message:

C:\Users\Mark\Documents\Coding Projekte\chess-notation\node_modules\cm-chessboard: Command failed.
Exit code: 1
Command: node postinstall.js
Arguments:
Directory: C:\Users\Mark\Documents\Coding Projekte\chess-notation\node_modules\cm-chessboard
Output:
mkdir lib
Linking ..\..\svjs-svg\src\svjs-svg => ./lib/svjs-svg (dir)
fs.js:1031
  return binding.symlink(preprocessSymlinkDestination(target, type, path),
                 ^

Error: EPERM: operation not permitted, symlink '..\..\svjs-svg\src\svjs-svg' -> 'C:\Users\Mark\Documents\Coding Projekte\chess-notation\node_modules\cm-chessboard\lib\svjs-svg'
    at Object.fs.symlinkSync (fs.js:1031:18)

Seems to be a windows problem, apparently windows doesn't allow symlinks without admin rights 🤔

from cm-chessboard.

biowaffeln avatar biowaffeln commented on June 9, 2024

I just tried it out, the problem is indeed symlinks + admin rights. If I yarn add it in a powershell with admin rights, the installation will work.
Is it really necessary to use web-module-linker? After all, your README still says "no Dependencies except svjs-svg" 😜

from cm-chessboard.

shaack avatar shaack commented on June 9, 2024

Yes, right. :) The linking is necessay to use ES6 modules and npm/yarn together without transpiling. ES6, web and npm are not really compatible. Maybe transpiling would be the best way, but this destroys the es6 module concept.

from cm-chessboard.

biowaffeln avatar biowaffeln commented on June 9, 2024

I see. I created a PR (#17) that includes a note about this issue on the README for now, in case anyone else runs into it

from cm-chessboard.

shaack avatar shaack commented on June 9, 2024

Nice, thanks. For now an info to Windows users is the best solution. I think, when I have some time left in future, I will create a packaged distribution which combines svjs-svg and all chessboard classes and allows easy using cm-chessboard without symlinks.

from cm-chessboard.

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.