Closed coffeeDev98 closed 2 years ago
Try to understand your issue, but I fail with it. Could you do the following:
pgnXX
function is called.I have tried to reproduce your error. What I have understood is, that you take the start position, but you want black to start the game. I did the following:
Is that the scenario we are talking about?
I have identified the place, where the error happens, and could fix it (by using ?
as the only change).
At the moment, I don't want to create a new version of pgn-viewer, because I expect there other errors have been introduced by myself during refactoring, going from Javascript to Typescript. I have I can do that in a few days, perhaps the next weekend.
If you want to have it earlier, do the following:
npm install
npm run build
lib
, and deploy them to the application you want it to have.Yes, It is the same error I've mentioned above. Even if the black move is played, PGN is not recorded and following moves cannot be played.
The commit linked is the fix for this problem. I close it now, and will see when it will be part of a new version then. There will be a hint / comment about that then.
I created a new release 1.5.14, you should try to upgrade, and hopefully the error is not there any more. I just checked it on the configuration builder that is online. Just published to npm as well.
Tried to install the new release. Facing some issues
Packing chessground@https://github.com/mliebelt/Chessground.git#commit=2043d46eea121cfa8c6a6b84897bc98b5d74950c from sources
Using Yarn Classic for bootstrap. Reason: "__metadata" key not found in yarn.lock, must be a Yarn classic lockfile
➤ YN0000: Downloading https://nightly.yarnpkg.com/latest.js
➤ YN0000: Saving the new release in .yarn/releases/yarn-1.23.0-20220130.1630.cjs
➤ YN0000: Done in 0s 478ms
yarn install v1.23.0-20220130.1630
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
$ $npm_execpath run compile
Internal Error: chessground@workspace:.: This package doesn't seem to be present in your lockfile; run "yarn install" to update the lockfile
at gS.getCandidates (/Users/user/Desktop/betterEd/better-class/.yarn/releases/yarn-sources.cjs:285:4265)
at lc.getCandidates (/Users/user/Desktop/betterEd/better-class/.yarn/releases/yarn-sources.cjs:281:4819)
at /Users/user/Desktop/betterEd/better-class/.yarn/releases/yarn-sources.cjs:295:7544
at Object.prettifyAsyncErrors (/Users/user/Desktop/betterEd/better-class/.yarn/releases/yarn-sources.cjs:10:30361)
at D (/Users/user/Desktop/betterEd/better-class/.yarn/releases/yarn-sources.cjs:295:7507)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
Doesn't happen with the other versions though...
My problem with the latest release of Chessground was, that I had errors due to not all imports were done with the extension .js
.
If you want to look at it:
src/autoPieces.ts
The commit says: colophon Fix invalid es module output
So if you use the version 8.2.0 in your Typescript project, you have to fix that somehow. I tried to use the latest version in my package.json
==> "chessground": "mliebelt/Chessground"
that means it uses my fork (without any release information) which contains the current fix. I don't build it, just use it as it is.
So no, I have no idea where your problem comes from, but for me it worked. By downloading my release, the people should be able to use the release directly (not the Typescript sources perhaps), at least my HTML examples are all running.
Sorry that I have no idea where your problem comes from, I can only explain why I had to find some solution for the latest release of Chessground. Don't know which they are not doing a release for it ...
I'm using typescript version ^4.2.3
I get the following error when trying to install
➤ YN0058: │ chessground@https://github.com/mliebelt/Chessground.git#commit=2043d46eea121cfa8c6a6b84897bc98b5d74950c: Packing the package failed (exit code 1, logs can be found here: /private/var/folders/fx/1gzks4s56z993h86h1sqvcjw0000gn/T/xfs-b12d9b06/pack.log)
Sorry, it is really difficult to diagnose anything, because there are only snippets available. So again, do you have a public reference to the project that you are trying to do? Any reference, where I can find something? What did you do to provoke the error? When I use my fork of Chessground, no build at all is triggered (and no, it is not necessary, you can use it right from the sources).
I tried it again. This is what I did:
npm install
.modules/pgn-reader
, and start there npm install
.modules/pgn-viewer
, and start there npm install
.This works for me, no error. What you could do
PgnViewerJS
, and enable there issues.The reasons for that are:
Sorry, sound unpolite, but we are now discussing for many days (in a closed ticket) something completely unrelated. Please, follow my advise here.
No no, I understand. It's not unpolite. Sorry for dragging this discussion. It took me a while to come down to a reproducible scenario as the package worked fine in other projects.
Did some testing with yarn
and noticed the issue occurs in yarn versions above 1.23.x
.
Our project currently requires to be run on yarn v2.4.0
But you can reproduce this issue with yarn v3.2.0
I cannot. Please follow my advise ...
Having an issue when changing the start turn to BLACK. Example FEN: rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR b KQkq - 0 1