Vue-select: Potential build error

Created on 3 Sep 2017  路  6Comments  路  Source: sagalbot/vue-select

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.

Most helpful comment

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

All 6 comments

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

davidalvarezr picture davidalvarezr  路  3Comments

NexoraSolutions picture NexoraSolutions  路  3Comments

threeaccents picture threeaccents  路  3Comments

pud1m picture pud1m  路  3Comments

FrozenIce0617 picture FrozenIce0617  路  3Comments