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.

Cannot use Vue with browserify (regression)

See original GitHub issue

Vue.js version

2.0.6

Reproduction Link

https://github.com/ernestoalejo/vue-repro (only 3 files, it’s very simple)

Steps to reproduce

  1. clone the repo
  2. npm install
  3. gulp

What is Expected?

To build the app correctly.

What is actually happening?

After the commit https://github.com/vuejs/vue/commit/a4fcdbe6731ca4a0ef6a3f94ef06d56cc92636f7 it requires the “he” package and it can’t found it:

Error: Cannot find module 'he' from '/.../vue-repro/node_modules/vue/dist'
    at /.../vue-repro/node_modules/browserify/node_modules/resolve/lib/async.js:46:17
    at process (/.../vue-repro/node_modules/browserify/node_modules/resolve/lib/async.js:173:43)
    at ondir (/.../vue-repro/node_modules/browserify/node_modules/resolve/lib/async.js:188:17)
    at load (/.../vue-repro/node_modules/browserify/node_modules/resolve/lib/async.js:69:43)
    at onex (/.../vue-repro/node_modules/browserify/node_modules/resolve/lib/async.js:92:31)
    at /.../vue-repro/node_modules/browserify/node_modules/resolve/lib/async.js:22:47
    at FSReqWrap.oncomplete (fs.js:82:15)

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:3
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
yyx990803commented, Nov 16, 2016

This has been reverted/fixed in 2.0.7.

3reactions
yyx990803commented, Nov 16, 2016

For now the workaround is do not parse vue/dist/vue.js for requires - browserify has the noparse flag and Webpack has the module.noParse option.

We will fix it in the next release.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Publishing .vue to npm for use with browserify - Stack Overflow
I only use browserify; I don't use webpack at all. I thus bundle all .vue files into a single build.js using a vueify...
Read more >
vue breaking change: webpack < 5 used to include polyfills for ...
I am struggling to find a solution to this problem. I installed the ccxt library via npm but when I include it in...
Read more >
Packaging Vue Components for npm
Vue components by nature are meant to be re-used. This is easy when the component is only used within a single application. But...
Read more >
Changelog - Cypress Documentation
Fixed an 11.0.0 regression where using custom reporters would cause Cypress to throw a 'Cannot find module' error. Fixes #24607; Fixed testIsolation ...
Read more >
Resolve | webpack
When enabled, symlinked resources are resolved to their real path, not their symlinked location. Note that this may cause module resolution to fail...
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