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.

nextTick is not available when building with Rollup

See original GitHub issue

Rollup build fails due to nextTick missing.

➜  masonry git:(master) ✗ npm run build

> masonry@0.0.0 build
> vue-tsc --noEmit && vite build

vite v2.2.4 building for production...
✓ 91 modules transformed.
'nextTick' is not exported by node_modules/vue-masonry/node_modules/vue/dist/vue.runtime.esm.js, imported by node_modules/vue-masonry/src/masonry-vue3.plugin.js
file: /Users/toni/Documents/Omat/masonry/node_modules/vue-masonry/src/masonry-vue3.plugin.js:5:9
3:
4: // Vue 3 Global API changed: nextTick import
5: import { nextTick } from 'vue';
            ^
6:
7: const attributesMap = {
error during build:
Error: 'nextTick' is not exported by node_modules/vue-masonry/node_modules/vue/dist/vue.runtime.esm.js, imported by node_modules/vue-masonry/src/masonry-vue3.plugin.js
    at error (/Users/toni/Documents/Omat/masonry/node_modules/rollup/dist/shared/rollup.js:5309:30)
    at Module.error (/Users/toni/Documents/Omat/masonry/node_modules/rollup/dist/shared/rollup.js:9765:16)
    at Module.traceVariable (/Users/toni/Documents/Omat/masonry/node_modules/rollup/dist/shared/rollup.js:10151:29)
    at ModuleScope.findVariable (/Users/toni/Documents/Omat/masonry/node_modules/rollup/dist/shared/rollup.js:8905:39)
    at ChildScope.findVariable (/Users/toni/Documents/Omat/masonry/node_modules/rollup/dist/shared/rollup.js:2636:38)
    at ClassBodyScope.findVariable (/Users/toni/Documents/Omat/masonry/node_modules/rollup/dist/shared/rollup.js:2636:38)
    at FunctionScope.findVariable (/Users/toni/Documents/Omat/masonry/node_modules/rollup/dist/shared/rollup.js:2636:38)
    at ChildScope.findVariable (/Users/toni/Documents/Omat/masonry/node_modules/rollup/dist/shared/rollup.js:2636:38)
    at FunctionScope.findVariable (/Users/toni/Documents/Omat/masonry/node_modules/rollup/dist/shared/rollup.js:2636:38)
    at ChildScope.findVariable (/Users/toni/Documents/Omat/masonry/node_modules/rollup/dist/shared/rollup.js:2636:38)
├── @vitejs/plugin-vue@1.2.2
├── @vue/compiler-sfc@3.0.11
├── autoprefixer@10.2.5
├── axios@0.21.1
├── mitt@2.1.0
├── postcss@8.2.14
├── typescript@4.2.4
├── vite@2.2.4
├── vue-class-component@8.0.0-rc.1
├── vue-masonry@0.13.0
├── vue-router@4.0.6
├── vue-tsc@0.1.2
├── vue@3.0.11
└── vuex@4.0.0

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:11 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
shershen08commented, Nov 10, 2021

i’ve created a0.14.0-beta.0 version to test v2/v3 works smoothly please try to install and have a look

src/masonry-vue3.plugin.js is still there for compatibility, will be removed in final version0.14.0

#118

Read more comments on GitHub >

github_iconTop Results From Across the Web

Polyfill node os module with vite/rollup.js - Stack Overflow
Tracing this error it comes from constructing the useragent string. I tried installing rollup-plugin-polyfill-node and adding it to vite.config.js but still ...
Read more >
Global API: General - Vue.js
nextTick () # ... A utility for waiting for the next DOM update flush. ... When you mutate reactive state in Vue, the...
Read more >
Webpack 5 Issues | Documentation - Web3Auth
If you are using vite/svelte/rollup you may run into issues building. This is because NodeJS polyfills are not included. Solution​. Install the missing...
Read more >
@rollup/plugin-commonjs - npm
This can throw at build time if there is no default export. This is how external dependencies are handled when esmExternals is not...
Read more >
Creating a Vue module with Rollup and Typescript
I found in rollup a great tool for creating npm modules. Is particulary easy to understend, no need so much configuration but it's...
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