When trying to build this project, I get the below error:
npm install -g vue
npm install vue-select
cd node-modules/vue-select
npm install
npm run build
ERROR in vue-select.js from UglifyJs
SyntaxError: Unexpected token: name (VueSelect) [./src/index.js:1,0]
This makes me think that vue isn't installed correctly, but I have tried various ways of installing it via npm (installing it globally, installing it as a dependency instead of a peer dependency, installing it locally).
I wouldn't be surprised if this was being caused by something I was doing wrong, I'm new to js/npm/webpack. Any help would be greatly appreciated.
No need to run the build to use it in your project. Running the build is only done when a new version of vue-select is ready to release.
If you're using a module bundler (webpack), you just need to include the modules to use them:
import Vue from 'vue';
import VueSelect from 'vue-select';
I want to fork vue-select and change some of its behavior for my project, which will require me being able to build it, right?
Yes it will. In that case:
$ git clone [email protected]:gregaz/vue-select.git
$ cd vue-select
$ npm install
$ npm run build
That worked for me! It's a matter of cloning the repo vs installing it via npm. Thanks!
Hello,
I forking & cloning, but stumbled upon the same problem:
Hash: 97ccbd3f7cb7f9d8a564
Version: webpack 1.15.0
Time: 52ms
Asset Size Chunks Chunk Names
vue-select.js 2.04 kB 0 [emitted] lib
vue-select.js.map 2.31 kB 0 [emitted] lib
ERROR in vue-select.js from UglifyJs
SyntaxError: Unexpected token: name (VueSelect) [./src/index.js:1,0]
How can I solve it?
Many thanks
I am having the same issue and I cloned but still get this error
ERROR in vue-select.js from UglifyJs
SyntaxError: Unexpected token: name (VueSelect) [./src/index.js:1,0]
Any help would be appreciated. Thanks
Most helpful comment
Hello,
I forking & cloning, but stumbled upon the same problem:
How can I solve it?
Many thanks