Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin folder fails to build when building from git. #1393

Open
fabanc opened this issue Oct 23, 2023 · 1 comment
Open

Plugin folder fails to build when building from git. #1393

fabanc opened this issue Oct 23, 2023 · 1 comment

Comments

@fabanc
Copy link

fabanc commented Oct 23, 2023

Describe the bug
When installing from the git repository (not npm), the script npm run build fails. The error message is:

(rpt2 plugin) Error: D:/git/gridjs/plugins/selection/src/rowSelection/rowSelection.tsx(3,71): semantic error TS2307: Cannot find module 'gridjs' or its corresponding type declarations. Error: D:/git/gridjs/plugins/selection/src/rowSelection/rowSelection.tsx(3,71): semantic error TS2307: Cannot find module 'gridjs' or its corresponding type declarations.

To Reproduce
Steps to reproduce the behavior:

  1. Clone the project from github: git clone https://github.com/grid-js/gridjs.git
  2. Move the terminal into the gridjs repository: cd gridjs
  3. Run the build command: npm run build
  4. See error
> gridjs@6.0.6 prebuild
> npm run clean


> gridjs@6.0.6 clean
> rimraf coverage dist tmp l10n/dist 'plugins/!(node_modules)/dist'


> gridjs@6.0.6 build
> run-p build:grid build:i18n build:plugins build:themes


> gridjs@6.0.6 build:grid
> microbundle build --raw --external none --tsconfig tsconfig.release.json


> gridjs@6.0.6 build:i18n
> microbundle build --raw --cwd l10n --tsconfig l10n/tsconfig.release.json


> gridjs@6.0.6 build:plugins
> microbundle build --raw --cwd plugins/selection --tsconfig plugins/selection/tsconfig.release.json


> gridjs@6.0.6 prebuild:themes
> sass src/theme/mermaid/index.scss dist/theme/mermaid.css


> gridjs@6.0.6 build:themes
> run-p build:themes-dev build:themes-prod


> gridjs@6.0.6 build:themes-dev
> postcss dist/theme/mermaid.css --output dist/theme/mermaid.css --env development --verbose


> gridjs@6.0.6 build:themes-prod
> postcss dist/theme/mermaid.css --output dist/theme/mermaid.min.css --env production --verbose

Processing dist\theme\mermaid.css...
Processing dist\theme\mermaid.css...
Browserslist: caniuse-lite is outdated. Please run:
  npx update-browserslist-db@latest
  Why you should do it regularly: https://github.com/browserslist/update-db#readme
Browserslist: caniuse-lite is outdated. Please run:
  npx update-browserslist-db@latest
  Why you should do it regularly: https://github.com/browserslist/update-db#readme
Finished dist\theme\mermaid.css in 440 ms
Finished dist\theme\mermaid.css in 744 ms
(rpt2 plugin) Error: D:/git/gridjs/plugins/selection/src/rowSelection/rowSelection.tsx(3,71): semantic error TS2307: Cannot find module 'gridjs' or its corresponding type declarations.
Error: D:/git/gridjs/plugins/selection/src/rowSelection/rowSelection.tsx(3,71): semantic error TS2307: Cannot find module 'gridjs' or its corresponding type declarations.
    at error (D:\git\gridjs\node_modules\rollup\dist\shared\rollup.js:198:30)
    at throwPluginError (D:\git\gridjs\node_modules\rollup\dist\shared\rollup.js:21718:12)
    at Object.error (D:\git\gridjs\node_modules\rollup\dist\shared\rollup.js:22672:20)
    at Object.error (D:\git\gridjs\node_modules\rollup\dist\shared\rollup.js:21895:42)
    at RollupContext.error (D:\git\gridjs\node_modules\rollup-plugin-typescript2\dist\rollup-plugin-typescript2.cjs.js:20259:30)
    at D:\git\gridjs\node_modules\rollup-plugin-typescript2\dist\rollup-plugin-typescript2.cjs.js:29527:23
    at Array.forEach (<anonymous>)
    at printDiagnostics (D:\git\gridjs\node_modules\rollup-plugin-typescript2\dist\rollup-plugin-typescript2.cjs.js:29500:17)
    at Object.transform (D:\git\gridjs\node_modules\rollup-plugin-typescript2\dist\rollup-plugin-typescript2.cjs.js:29785:17)
    at D:\git\gridjs\node_modules\rollup\dist\shared\rollup.js:22879:40

ERROR: "build:plugins" exited with 1.

Expected behavior

The command npm run build should work out of the box, unless there are specific steps to run before. In that case, it should be documented in the read me file.

Screenshots

image

Desktop:

  • OS: Windows 10 Enterprise | 22H2
  • Browser: Chrome 118.0.5993.89 (Official Build) (64-bit) (though irrelevant in that case)
  • Version [e.g. 22] 6.0.6
  • Git version: version 2.39.2.windows.1
@mrsnax
Copy link

mrsnax commented Feb 19, 2024

same here, cant build properly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants