Skip to content
This repository has been archived by the owner. It is now read-only.

Browserify Failed!: Unexpected token, related to new spinner.scss #198

Open
vesper8 opened this issue May 17, 2016 · 14 comments
Open

Browserify Failed!: Unexpected token, related to new spinner.scss #198

vesper8 opened this issue May 17, 2016 · 14 comments

Comments

@vesper8
Copy link

@vesper8 vesper8 commented May 17, 2016

Getting this build error when running gulp since updating from the master to the 1.0.10 branch

Saving To...
   - public/js/app.js

[05:27:05] gulp-notify: [Laravel Elixir] Browserify Failed!: Unexpected token

/home/vagrant/DEV/www.mydomain.com/node_modules/vue-strap/src/spinner.scss:10
$brand-primary: darken(#428bca, 6.5%); // #337ab7
              ^
ParseError: Unexpected token

Any ideas why?

This is my package.json

{
  "private": true,
  "devDependencies": {
    "gulp": "^3.8.8"
  },
  "dependencies": {
    "bootstrap": "^3.0.0",
    "jquery": "^2.1.4",
    "js-cookie": "^2.1.0",
    "laravel-elixir": "^4.0.0",
    "moment": "^2.10.6",
    "promise": "^7.1.1",
    "sweetalert": "^1.1.3",
    "underscore": "^1.8.3",
    "urijs": "^1.17.0",
    "vue": "^1.0.21",
    "vue-resource": "^0.5.1",
    "laravel-elixir-vueify": "^1.0.3",
    "vue-strap": "^1.0.10"
  }
}
@vesper8
Copy link
Author

@vesper8 vesper8 commented May 17, 2016

And this is my gulpfile.

Do I not currently support sass right now is that the problem? How do I fix it?

var elixir = require('laravel-elixir');

require('laravel-elixir-vueify');

elixir(function(mix) {
    mix.less('app.less')
       .browserify('app.js', null, null, { paths: 'vendor/laravel/spark/resources/assets/js' })
       .copy('node_modules/sweetalert/dist/sweetalert.min.js', 'public/js/sweetalert.min.js')
       .copy('node_modules/sweetalert/dist/sweetalert.css', 'public/css/sweetalert.css');
});
@amanpatel
Copy link
Collaborator

@amanpatel amanpatel commented May 17, 2016

Good point. This is from the new spinner component. Will remove the sass dependency soon. In the mean time try a npm install.

On May 17, 2016, 12:35 AM -0500, vesper8notifications@github.com, wrote:

And this is my gulpfile.

Do I not currently support sass right now is that the problem? How do I fix it?

var elixir = require('laravel-elixir'); require('laravel-elixir-vueify'); elixir(function(mix) { mix.less('app.less') .browserify('app.js', null, null, { paths: 'vendor/laravel/spark/resources/assets/js' }) .copy('node_modules/sweetalert/dist/sweetalert.min.js', 'public/js/sweetalert.min.js') .copy('node_modules/sweetalert/dist/sweetalert.css', 'public/css/sweetalert.css'); });


You are receiving this because you are subscribed to this thread.
Reply to this email directly orview it on GitHub(#198 (comment))

@loranger
Copy link

@loranger loranger commented May 17, 2016

I do use sass, but I have the ParseError too :

[11:48:46] gulp-notify: [Laravel Elixir] Browserify Failed!: Unexpected token

/Users/loranger/Developer/projects/awe/node_modules/vue-strap/src/spinner.scss:10
$brand-primary: darken(#428bca, 6.5%); // #337ab7
              ^
ParseError: Unexpected token

And my gulpfile :

var elixir = require('laravel-elixir');
require('laravel-elixir-vueify');

elixir(function(mix) {
  mix.sass('vendor.scss', null, { includePaths: ['node_modules/'] })
    .sass('awe.scss', null, { includePaths: ['node_modules/'] })
    .browserify('admin.js', 'public/js/admin.js')
    .browserify('awe.js', 'public/js/awe.js')
  ;
});

What can I do ?

@amanpatel
Copy link
Collaborator

@amanpatel amanpatel commented May 17, 2016

I'll need some time to fix this. Can you try npm install in your project and see if it helps?

On May 17, 2016, 4:53 AM -0500, Laurent Goussardnotifications@github.com, wrote:

I do use sass, but I have the ParseError too :

[11:48:46] gulp-notify: [Laravel Elixir] Browserify Failed!: Unexpected token /Users/loranger/Developer/projects/awe/node_modules/vue-strap/src/spinner.scss:10 $brand-primary: darken(#428bca, 6.5%); // #337ab7 ^ ParseError: Unexpected token

And my gulpfile :

varelixir=require('laravel-elixir');require('laravel-elixir-vueify');elixir(function(mix) {mix.sass('vendor.scss',null, { includePaths:['node_modules/'] }) .sass('awe.scss',null, { includePaths:['node_modules/'] }) .browserify('admin.js','public/js/admin.js') .browserify('awe.js','public/js/awe.js') ; });

What can I do ?


You are receiving this because you commented.
Reply to this email directly orview it on GitHub(#198 (comment))

@doonetheprune
Copy link

@doonetheprune doonetheprune commented May 17, 2016

@amanpatel I have created issue #196 which I think is the reason for this issue as well. If the package.json was changed back to the dist folder these issues would be solved.

@vesper8
Copy link
Author

@vesper8 vesper8 commented May 18, 2016

fyi doing a npm install (or npm update) simply does nothing. nothing new gets installed or updated (with my package.json above) and the gulp error stays the same

@loranger
Copy link

@loranger loranger commented May 18, 2016

Sorry, I'm just trying and, as @vesper8 said, npm install or update does not fix the issue.

@lukpep
Copy link

@lukpep lukpep commented May 18, 2016

using npm and same error - with Alert.vue

build.js:18655 Uncaught SyntaxError: Unexpected token import

/***/ function(module, exports) {

    import alert from './Alert.vue'
    import carousel from './Carousel.vue'
    import slider from './Slider.vue'
    import accordion from './Accordion.vue'
    import affix from './Affix.vue'
@doonetheprune
Copy link

@doonetheprune doonetheprune commented May 18, 2016

@vesper8 @loranger @lukpep PR #200 was merged yesterday however, I forgot to bump the version number so npm wont be picking up the change. Depending on how desperately you need vue-strap to work you could manually edit node_modules/vue-strap/package.json and change the main to "main": "dist/vue-strap.js", see this line

Hope that helps

@lukpep
Copy link

@lukpep lukpep commented May 18, 2016

@doonetheprune - thx. I've did a rollback to 1.0.7 and will wait for 1.0.11 on npm

@amanpatel
Copy link
Collaborator

@amanpatel amanpatel commented May 18, 2016

1.0.11 is now published. Please close the issue if it fixes it. yuche had accepted the change in package.json which changes the way people can use the package. It's now back to the way it worked before.

@tverp
Copy link

@tverp tverp commented May 23, 2016

The issue is still here for me.

@steven-klein
Copy link

@steven-klein steven-klein commented May 25, 2016

@tverp PR #212 has got this working for me.

@antongorodezkiy
Copy link

@antongorodezkiy antongorodezkiy commented Jun 7, 2016

Have the same issue

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
8 participants
You can’t perform that action at this time.