question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Vite fails with not exported node module

See original GitHub issue

Actual behavior

gradlew clean build fails with:

> Task :vaadinBuildFrontend FAILED

 ***** All completed @ Sun Oct 16 13:23:54 CEST 2022  ***

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':vaadinBuildFrontend'.
> Vite process exited with non-zero exit code.
  Stderr: 'vite v3.1.0 building for production...
  transforming...
  Use of eval is strongly discouraged, as it poses security risks and may cause issues with minification
  Use of eval is strongly discouraged, as it poses security risks and may cause issues with minification
  ? 876 modules transformed.
  'render' is not exported by node_modules/lit/index.js, imported by node_modules/@vaadin/flow-frontend/lit-renderer.ts
  file: D:/Hausi/lessoria-ui/node_modules/@vaadin/flow-frontend/lit-renderer.ts:1:9
  1: import { render, html } from 'lit';
              ^
  2:
  3: type RenderRoot = HTMLElement & { __litRenderer?: Renderer; _$litPart$?: any };
  error during build:
  Error: 'render' is not exported by node_modules/lit/index.js, imported by node_modules/@vaadin/flow-frontend/lit-renderer.ts
      at error (file:///D:/Hausi/lessoria-ui/node_modules/rollup/dist/es/shared/rollup.js:1858:30)
      at Module.error (file:///D:/Hausi/lessoria-ui/node_modules/rollup/dist/es/shared/rollup.js:12429:16)
      at Module.traceVariable (file:///D:/Hausi/lessoria-ui/node_modules/rollup/dist/es/shared/rollup.js:12788:29)
      at ModuleScope.findVariable (file:///D:/Hausi/lessoria-ui/node_modules/rollup/dist/es/shared/rollup.js:11440:39)
      at ReturnValueScope.findVariable (file:///D:/Hausi/lessoria-ui/node_modules/rollup/dist/es/shared/rollup.js:6372:38)
      at ChildScope.findVariable (file:///D:/Hausi/lessoria-ui/node_modules/rollup/dist/es/shared/rollup.js:6372:38)
      at Identifier.bind (file:///D:/Hausi/lessoria-ui/node_modules/rollup/dist/es/shared/rollup.js:7439:40)
      at CallExpression.bind (file:///D:/Hausi/lessoria-ui/node_modules/rollup/dist/es/shared/rollup.js:5265:73)
      at CallExpression.bind (file:///D:/Hausi/lessoria-ui/node_modules/rollup/dist/es/shared/rollup.js:8935:15)
      at VariableDeclarator.bind (file:///D:/Hausi/lessoria-ui/node_modules/rollup/dist/es/shared/rollup.js:5269:23)
  '

Versions:

- Vaadin / Flow version: 23.2.4
- Java version: OpenJDK 64-Bit Server VM Temurin-17.0.4+8 (build 17.0.4+8, mixed mode, sharing)
- OS version: Windows 11
- Browser version (if applicable):
- Application Server (if applicable): Spring
- IDE (if applicable): gradlew clean build
- Development or production mode: production mode
- Project from start.vaadin.com or activated in application:

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:2
  • Comments:24 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
mstahvcommented, Nov 2, 2022

I’d guess we only have an add-on issue here and no framework issue so this could be closed?

I couldn’t make the project build or to test it right away, but let’s continue the discussion in: https://github.com/parttio/grid-pagination/issues/22

1reaction
mstahvcommented, Oct 31, 2022

Excellent, big thanks! I’ll ask Sami to change the ownership in the vaadin.com/directory, after that I can cut a new release 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

Laravel Vite build error: 'resolve' is not exported by __vite ...
I'm trying to build and version the assets for production in a Laravel project. I'm using laravel-vite-plugin version 0.6.1, node version v16.17.1, ...
Read more >
Laravel Vite build error: 'resolve' is not exported by __vite ...
I'm trying to build and version the assets for production in a Laravel project. I'm using laravel-vite-plugin version 0.6.1, node version ...
Read more >
vite exports is not defined | The Search Engine You Control
Describe the bug After switching to @storybook/builder-vite I get the following error: Uncaught ReferenceError: exports is not defined at preview.js:3:23 It ...
Read more >
Build Options - Vite
Note the build will fail if the code contains features that cannot be safely ... js import 'vite/modulepreload-polyfill'. Note: the polyfill does not...
Read more >
rollup.js
Importing CommonJS · Publishing ES Modules ... The specification is now fixed, but it is only implemented in modern browsers and not finalised...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found