antvis / XFlow

React component for building interactive diagrams.

Home Page:https://x6.antv.antgroup.com/xflow/guide/introduction

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Lint and test fail on the 2.0 branch

mayank1513 opened this issue · comments

Describe the bug

2 tests are failing on the 2.0 branch after running pnpm bootstrap.

  • pnpm bootstrap modifies the lock file.
  • After that I try running pnpm lint and pnpm test -> both fail.

Your Example Website or App

https://github.com/mayank1513/XFlow/

Steps to Reproduce the Bug or Issue

  1. Fork the repo
  2. follow contributing.md
  • pnpm bootstrap modifies the lock file.
  • After that I try running pnpm lint and pnpm test -> both fail.

Expected behavior

Tests and Lint should pass.

Screenshots or Videos

No response

Platform

  • OS: [linux-gnu, GitHub default codespace]
  • Browser: [NA]
  • Version: [NA]

Additional context

Tests should be fixed.

Also, the pre-commit hook throws errors. .husky/pre-commit: 8: Syntax error: "(" unexpected (expecting "then")
husky - pre-commit hook exited with code 2 (error)

Tried fixing by changing sh to bash -> Does not work.

nx run core:lint:css
> @antv/xflow@2.1.6 lint:css /workspaces/XFlow/packages/core
> stylelint --allow-empty-input 'src/**/*.{css,less}'

   Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './lib/input' is not defined by "exports" in /workspaces/XFlow/node_modules/.pnpm/postcss-less@6.0.0_postcss@8.0.0/node_modules/postcss/package.json
       at exportsNotFound (node:internal/modules/esm/resolve:304:10)
       at packageExportsResolve (node:internal/modules/esm/resolve:651:9)
       at resolveExports (node:internal/modules/cjs/loader:592:36)
       at Module._findPath (node:internal/modules/cjs/loader:669:31)
       at Module._resolveFilename (node:internal/modules/cjs/loader:1131:27)
       at Module._load (node:internal/modules/cjs/loader:986:27)
       at Module.require (node:internal/modules/cjs/loader:1233:19)
       at require (/workspaces/XFlow/node_modules/.pnpm/v8-compile-cache@2.4.0/node_modules/v8-compile-cache/v8-compile-cache.js:159:20)
       at Object.<anonymous> (/workspaces/XFlow/node_modules/.pnpm/postcss-less@6.0.0_postcss@8.0.0/node_modules/postcss-less/lib/index.js:3:15)
       at Module._compile (/workspaces/XFlow/node_modules/.pnpm/v8-compile-cache@2.4.0/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
    ELIFECYCLE  Command failed with exit code 1.
   

✖  nx run diff:lint:css
   > @antv/xflow-diff@1.0.0 lint:css /workspaces/XFlow/packages/diff
   > stylelint --allow-empty-input 'src/**/*.{css,less}'
   
   Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './lib/input' is not defined by "exports" in /workspaces/XFlow/node_modules/.pnpm/postcss-less@6.0.0_postcss@8.0.0/node_modules/postcss/package.json
       at exportsNotFound (node:internal/modules/esm/resolve:304:10)
       at packageExportsResolve (node:internal/modules/esm/resolve:651:9)
       at resolveExports (node:internal/modules/cjs/loader:592:36)
       at Module._findPath (node:internal/modules/cjs/loader:669:31)
       at Module._resolveFilename (node:internal/modules/cjs/loader:1131:27)
       at Module._load (node:internal/modules/cjs/loader:986:27)
       at Module.require (node:internal/modules/cjs/loader:1233:19)
       at require (/workspaces/XFlow/node_modules/.pnpm/v8-compile-cache@2.4.0/node_modules/v8-compile-cache/v8-compile-cache.js:159:20)
       at Object.<anonymous> (/workspaces/XFlow/node_modules/.pnpm/postcss-less@6.0.0_postcss@8.0.0/node_modules/postcss-less/lib/index.js:3:15)
       at Module._compile (/workspaces/XFlow/node_modules/.pnpm/v8-compile-cache@2.4.0/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
    ELIFECYCLE  Command failed with exit code 1.

———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————

NX Ran target lint for 2 projects and 6 tasks they depend on (2s)

✔    4/6 succeeded [4 read from cache]

✖    2/6 targets failed, including the following:
     - nx run core:lint:css
     - nx run diff:lint:css

Hiya!

This issue has gone quiet. Spooky quiet. 👻

We get a lot of issues, so we currently close issues after 60 days of inactivity. It’s been at least 20 days since the last update here. If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not-stale" to keep this issue open!

As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out contribute for more information about opening PRs, triaging issues, and contributing!

Thanks for being a part of the AntV community! 💪💯