[GH-ISSUE #479] file_get_contents #337

Closed
opened 2026-02-26 02:32:53 +03:00 by kerem · 3 comments
Owner

Originally created by @JulienLavocat on GitHub (Nov 11, 2016).
Original GitHub issue: https://github.com/koel/koel/issues/479

Hi,

When accessing koel after installing I got this error :
https://gyazo.com/5352355d36a5d2d9c1c851650ce6322d

I read the wiki, and i run "npm install" to solve the problem, but I didn't solve anything.

Maybe I did something wrong ?

Originally created by @JulienLavocat on GitHub (Nov 11, 2016). Original GitHub issue: https://github.com/koel/koel/issues/479 Hi, When accessing koel after installing I got this error : https://gyazo.com/5352355d36a5d2d9c1c851650ce6322d I read the wiki, and i run "npm install" to solve the problem, but I didn't solve anything. Maybe I did something wrong ?
kerem closed this issue 2026-02-26 02:32:53 +03:00
Author
Owner

@gamerlv commented on GitHub (Nov 13, 2016):

It appears that the gulp task did not execute successfully. I read you already ran the command npm install but did it output anything, errors or warnings perhaps?

If all the required modules have been installed and you still get this error message it's possible to run gulp manually using the following command, run from the root application folder. ( /var/www/html/koel in your case)

./node_modules/.bin/cross-env NODE_ENV=production && ./node_modules/.bin/gulp --production
<!-- gh-comment-id:260198029 --> @gamerlv commented on GitHub (Nov 13, 2016): It appears that the gulp task did not execute successfully. I read you already ran the command `npm install` but did it output anything, errors or warnings perhaps? If all the required modules have been installed and you still get this error message it's possible to run gulp manually using the following command, run from the root application folder. ( `/var/www/html/koel` in your case) ``` bash ./node_modules/.bin/cross-env NODE_ENV=production && ./node_modules/.bin/gulp --production ```
Author
Owner

@mayrmartin commented on GitHub (Nov 19, 2016):

I have the same problem.
I ran /node_modules/.bin/cross-env NODE_ENV=production && ./node_modules/.bin/gulp --production and got this output with these errors:


> [18:08:41] Using gulpfile /media/offgridStorage/koel/public_html/gulpfile.js
> [18:08:41] Starting 'default'...
> [18:08:41] Starting 'browserify'...
> 
> Fetching Browserify Source Files...
>    - resources/assets/js/main.js
> 
> 
> Saving To...
>    - public/js/main.js
> 
> [18:08:41] Finished 'default' after 478 ms
> [18:08:43] gulp-notify: [Laravel Elixir] Browserify Failed!: Unexpected token (29:7) while parsing /media/offgridStorage/koel/public_html/resources/assets/js/app.vue while parsing file: /media/offgridStorage/koel/public_html/resources/assets/js/app.vue
> { [SyntaxError: Unexpected token (29:7) while parsing /media/offgridStorage/koel/public_html/resources/assets/js/app.vue while parsing file: /media/offgridStorage/koel/public_html/resources/assets/js/app.vue]
>   type: 'syntax',
>   filename: '/media/offgridStorage/koel/public_html/resources/assets/js/app.vue',
>   stream: 
>    Labeled {
>      _readableState: 
>       ReadableState {
>         highWaterMark: 16,
>         buffer: [],
>         length: 0,
>         pipes: [Object],
>         pipesCount: 1,
>         flowing: true,
>         ended: false,
>         endEmitted: false,
>         reading: true,
>         sync: false,
>         needReadable: true,
>         emittedReadable: false,
>         readableListening: false,
>         objectMode: true,
>         defaultEncoding: 'utf8',
>         ranOut: false,
>         awaitDrain: 0,
>         readingMore: false,
>         decoder: null,
>         encoding: null,
>         resumeScheduled: false },
>      readable: true,
>      domain: null,
>      _events: 
>       { end: [Object],
>         error: [Object],
>         data: [Function: ondata],
>         _mutate: [Object] },
>      _eventsCount: 4,
>      _maxListeners: undefined,
>      _writableState: 
>       WritableState {
>         highWaterMark: 16,
>         objectMode: true,
>         needDrain: false,
>         ending: true,
>         ended: true,
>         finished: true,
>         decodeStrings: true,
>         defaultEncoding: 'utf8',
>         length: 0,
>         writing: false,
>         corked: 0,
>         sync: false,
>         bufferProcessing: false,
>         onwrite: [Function],
>         writecb: null,
>         writelen: 0,
>         buffer: [],
>         pendingcb: 0,
>         prefinished: true,
>         errorEmitted: false },
>      writable: true,
>      allowHalfOpen: true,
>      _options: { objectMode: true },
>      _wrapOptions: { objectMode: true },
>      _streams: [ [Object] ],
>      length: 1,
>      label: 'deps' } }
> [18:08:43] Finished 'browserify' after 1.84 s
> [18:08:43] Starting 'sass'...
> 
> Fetching Sass Source Files...
>    - resources/assets/sass/app.scss
> 
> 
> Saving To...
>    - public/css/app.css
> 
> [18:08:44] gulp-notify: [Laravel Elixir] Sass Compiled!
> [18:08:44] Finished 'sass' after 1.54 s
> [18:08:44] Starting 'copy'...
> 
> Fetching Copy Source Files...
>    - resources/assets/img/**/*
> 
> 
> Saving To...
>    - public/img
> 
> [18:08:46] Finished 'copy' after 1.99 s
> [18:08:46] Starting 'copy'...
> 
> Fetching Copy Source Files...
>    - node_modules/font-awesome/fonts/**/*
> 
> 
> Saving To...
>    - public/build/fonts
> 
> [18:08:46] Finished 'copy' after 247 ms
> [18:08:46] Starting 'scripts'...
> 
> Fetching Scripts Source Files...
>    - node_modules/babel-polyfill/dist/polyfill.min.js
>    - node_modules/plyr/dist/plyr.js
>    - resources/assets/js/libs/modernizr-custom.js
> 
> 
> Saving To...
>    - public/js/vendors.js
> 
> [18:08:49] gulp-notify: [Laravel Elixir] Scripts Merged!
> [18:08:49] Finished 'scripts' after 2.45 s
> [18:08:49] Starting 'styles'...
> 
> Fetching Styles Source Files...
>    - resources/assets/css/**/*.css
>    - node_modules/font-awesome/css/font-awesome.min.css
>    - node_modules/rangeslider.js/dist/rangeslider.css
>    - node_modules/sweetalert/dist/sweetalert.css
> 
> 
> Saving To...
>    - public/css/vendors.css
> 
> [18:08:49] gulp-notify: [Laravel Elixir] Stylesheets Merged!
> [18:08:49] Finished 'styles' after 408 ms
> [18:08:49] Starting 'version'...
> 
> Fetching Version Source Files...
>    - public/css/vendors.css
>    - public/css/app.css
>    - public/js/vendors.js
>    - public/js/main.js <-- Not Found
> 
> 
> Saving To...
>    - public/build
> 
> [18:08:49] Finished 'version' after 127 ms
> [18:08:49] Starting 'browserSync'...
> [18:08:49] Finished 'browserSync' after 110 μs



<!-- gh-comment-id:261726044 --> @mayrmartin commented on GitHub (Nov 19, 2016): I have the same problem. I ran `/node_modules/.bin/cross-env NODE_ENV=production && ./node_modules/.bin/gulp --production` and got this output with these errors: ``` > [18:08:41] Using gulpfile /media/offgridStorage/koel/public_html/gulpfile.js > [18:08:41] Starting 'default'... > [18:08:41] Starting 'browserify'... > > Fetching Browserify Source Files... > - resources/assets/js/main.js > > > Saving To... > - public/js/main.js > > [18:08:41] Finished 'default' after 478 ms > [18:08:43] gulp-notify: [Laravel Elixir] Browserify Failed!: Unexpected token (29:7) while parsing /media/offgridStorage/koel/public_html/resources/assets/js/app.vue while parsing file: /media/offgridStorage/koel/public_html/resources/assets/js/app.vue > { [SyntaxError: Unexpected token (29:7) while parsing /media/offgridStorage/koel/public_html/resources/assets/js/app.vue while parsing file: /media/offgridStorage/koel/public_html/resources/assets/js/app.vue] > type: 'syntax', > filename: '/media/offgridStorage/koel/public_html/resources/assets/js/app.vue', > stream: > Labeled { > _readableState: > ReadableState { > highWaterMark: 16, > buffer: [], > length: 0, > pipes: [Object], > pipesCount: 1, > flowing: true, > ended: false, > endEmitted: false, > reading: true, > sync: false, > needReadable: true, > emittedReadable: false, > readableListening: false, > objectMode: true, > defaultEncoding: 'utf8', > ranOut: false, > awaitDrain: 0, > readingMore: false, > decoder: null, > encoding: null, > resumeScheduled: false }, > readable: true, > domain: null, > _events: > { end: [Object], > error: [Object], > data: [Function: ondata], > _mutate: [Object] }, > _eventsCount: 4, > _maxListeners: undefined, > _writableState: > WritableState { > highWaterMark: 16, > objectMode: true, > needDrain: false, > ending: true, > ended: true, > finished: true, > decodeStrings: true, > defaultEncoding: 'utf8', > length: 0, > writing: false, > corked: 0, > sync: false, > bufferProcessing: false, > onwrite: [Function], > writecb: null, > writelen: 0, > buffer: [], > pendingcb: 0, > prefinished: true, > errorEmitted: false }, > writable: true, > allowHalfOpen: true, > _options: { objectMode: true }, > _wrapOptions: { objectMode: true }, > _streams: [ [Object] ], > length: 1, > label: 'deps' } } > [18:08:43] Finished 'browserify' after 1.84 s > [18:08:43] Starting 'sass'... > > Fetching Sass Source Files... > - resources/assets/sass/app.scss > > > Saving To... > - public/css/app.css > > [18:08:44] gulp-notify: [Laravel Elixir] Sass Compiled! > [18:08:44] Finished 'sass' after 1.54 s > [18:08:44] Starting 'copy'... > > Fetching Copy Source Files... > - resources/assets/img/**/* > > > Saving To... > - public/img > > [18:08:46] Finished 'copy' after 1.99 s > [18:08:46] Starting 'copy'... > > Fetching Copy Source Files... > - node_modules/font-awesome/fonts/**/* > > > Saving To... > - public/build/fonts > > [18:08:46] Finished 'copy' after 247 ms > [18:08:46] Starting 'scripts'... > > Fetching Scripts Source Files... > - node_modules/babel-polyfill/dist/polyfill.min.js > - node_modules/plyr/dist/plyr.js > - resources/assets/js/libs/modernizr-custom.js > > > Saving To... > - public/js/vendors.js > > [18:08:49] gulp-notify: [Laravel Elixir] Scripts Merged! > [18:08:49] Finished 'scripts' after 2.45 s > [18:08:49] Starting 'styles'... > > Fetching Styles Source Files... > - resources/assets/css/**/*.css > - node_modules/font-awesome/css/font-awesome.min.css > - node_modules/rangeslider.js/dist/rangeslider.css > - node_modules/sweetalert/dist/sweetalert.css > > > Saving To... > - public/css/vendors.css > > [18:08:49] gulp-notify: [Laravel Elixir] Stylesheets Merged! > [18:08:49] Finished 'styles' after 408 ms > [18:08:49] Starting 'version'... > > Fetching Version Source Files... > - public/css/vendors.css > - public/css/app.css > - public/js/vendors.js > - public/js/main.js <-- Not Found > > > Saving To... > - public/build > > [18:08:49] Finished 'version' after 127 ms > [18:08:49] Starting 'browserSync'... > [18:08:49] Finished 'browserSync' after 110 μs ```
Author
Owner

@gamerlv commented on GitHub (Nov 20, 2016):

It seems to have difficulty grasping the ES5 import statement. Taking a wild stab I would say your nodejs version is too old. I'm not sure when they introduced support for that in nodejs but if your version is below version 6.8 I would suggest you update it.

If updating is not an option for you there may still be another way, but I'm not entirely sure it will work.
Copy & Paste the following line code at the top of gulpfile.js.

require("babel-register");
<!-- gh-comment-id:261748781 --> @gamerlv commented on GitHub (Nov 20, 2016): It seems to have difficulty grasping the ES5 _import_ statement. Taking a wild stab I would say your nodejs version is too old. I'm not sure when they introduced support for that in nodejs but if your version is below version 6.8 I would suggest you update it. If updating is not an option for you there may still be another way, but I'm not entirely sure it will work. Copy & Paste the following line code at the top of `gulpfile.js`. ``` js require("babel-register"); ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/koel-koel#337
No description provided.