Everytime I run gulp, I get no warning messages in the console, only when I re-vist my Laravel application:
File js/vendor.js not defined in asset manifest. (View:
/Users/Documents/app/resources/views/layouts/app.blade.php) (View:
/Users/Documents/app/resources/views/layouts/app.blade.php)
My gulpfile.js setup is:
var elixir = require('laravel-elixir');
elixir(function(mix) {
mix.scripts([
'../bower/jquery/dist/jquery.js',
'../bower/bootstrap/dist/js/bootstrap.js'
], 'public/js/vendor.js')
.version(["js/vendor.js", "build/vendor"]);
mix.scripts([
'../bower/holderjs/holder.js',
'../bower/bootstrap-select/dist/js/bootstrap-select.js',
'../bower/jasny-bootstrap/dist/js/jasny-bootstrap.js'
], 'public/js/addConsultant.js')
.version(["js/addConsultant.js", "build/addConsultant"]);
});
The output from running the gulp command is:
[16:12:44] Using gulpfile ~/Documents/compare/gulpfile.js [16:12:44]
Starting 'default'... [16:12:44] Starting 'scripts'...
Fetching Scripts Source Files...
- resources/assets/bower/jquery/dist/jquery.js
- resources/assets/bower/bootstrap/dist/js/bootstrap.js
Saving To...
- public/js/vendor.js
[16:12:45] Finished 'default' after 844 ms [16:12:45] gulp-notify:
[Laravel Elixir] Scripts Merged! [16:12:45] Finished 'scripts' after
1.02 s [16:12:45] Starting 'version'...
Fetching Version Source Files...
- public/js/vendor.js
- public/build/vendor/**/*
Saving To...
- public/build
[16:12:45] Finished 'version' after 51 ms [16:12:45] Starting
'scripts'...
Fetching Scripts Source Files...
- resources/assets/bower/holderjs/holder.js
- resources/assets/bower/bootstrap-select/dist/js/bootstrap-select.js
- resources/assets/bower/jasny-bootstrap/dist/js/jasny-bootstrap.js
Saving To...
- public/js/addConsultant.js
[16:12:46] gulp-notify: [Laravel Elixir] Scripts Merged! [16:12:46]
Finished 'scripts' after 201 ms [16:12:46] Starting 'version'...
Fetching Version Source Files...
- public/js/addConsultant.js
- public/build/addConsultant/**/*
Saving To...
- public/build
[16:12:46] Finished 'version' after 55 ms
Inside the public/build/rev-manifest.json file is the following:
{ "js/addConsultant.js": "js/addConsultant-4f9f7941f8.js" }
Why am I getting this error? Any help would be hugely appreciated.
Related
In the webpack build script, the 'awesome-typescript-loader' is started as a separate process. When webpack exit, this separate process is not yet finished , and so I cannot run the PM2 reload process...
Is there a way to detect the end of this separate process to start the PM2 reload correctly on time ?
To check the webpack timeline , I added a specific plugin
new WebpackShellPlugin({onBuildStart:['echo "Webpack Start"'],
onBuildEnd:['echo "Webpack End"'], onBuildExit:['echo "Webpack Exit"']})
running :
node_modules/.bin/webpack --config webpack.config.prod.js --progress --profile --bail
console log :
#example.com Executing pre-build scripts
#example.com "**Webpack Start**". # echo from WebpackShellPlugin
#example.com
#example.com [at-loader] Using typescript#2.0.10 from typescript and "tsconfig.json" from /opt/hello-angular/releases/20161206103220/tsconfig.json
#example.com
#example.com [at-loader] Checking started in a separate process...
# is there a way to keep track this process ?
#example.com
#example.com [at-loader] Ok, 5.531 sec.
#example.com Executing post-build scripts
#example.com "**Webpack End**" # echo from WebpackShellPlugin
#example.com Executing additional scripts before exit
#example.com "**Webpack Exit**". # echo from WebpackShellPlugin
#example.com Hash: 5c4be87232dc5ea6d7fa
#example.com Version: webpack 2.1.0-beta.27
#example.com Time: 70161ms
#example.com Asset Size Chunks Chunk Names
#example.com bundle.js 376 kB 0 [emitted] app
#example.com + 441 hidden modules
...
.... # [at-loader] output long process ....
5693ms asset optimization
....
#358ms emitting
localhost$. # [at-loader] process finished )
is there a way to get warned when the separate process ends up, and run my pm2 start command at this point ?
I found a solution, using a callback function in my shipit task ...
// this task builds the Angular bundle in the release folder
shipit.blTask('build_script', function () {
shipit.remote('cd '+ shipit.releasePath + ' && npm run build:' + env).then(function (res) {
console.log("WEBPACK BUILD CALLBACK FUNCTION... NOW RESTART PM2");
shipit.start('pm2-startOrReload');
});
});
Does anyone have a clue or any direction how to fix this error.
Running CentOS 6.7
[07:42 PM]-[vagrant#machine1]-[/var/www/laracast]
$ gulp
[19:42:52] Using gulpfile /var/www/laracast/gulpfile.js
[19:42:52] Starting 'default'...
[19:42:52] Starting 'sass'...
Fetching Sass Source Files...
- resources/assets/sass/app.scss
Saving To...
- public/css/app.css
[19:42:53] Finished 'default' after 733 ms
[19:42:53] gulp-notify: [Laravel Elixir] Sass Compiled!
[19:42:53] Finished 'sass' after 833 ms
[19:42:53] gulp-notify: [Error in notifier] Error in plugin 'gulp-notify'
Message:
(notify-send:24561): GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed
Disable gulp notify by export DISABLE_NOTIFIER=true
If you are running on a system that handles notifications poorly or you simply do not wish to use gulp-notify but your project does? You can disable gulp-notify by using enviroment variable DISABLE_NOTIFIER.
export DISABLE_NOTIFIER=true;
This will disable all methods; notify(), notify.onError and notify.withReporter.
See details here: disable-gulp-notify
Running Capistrano. Worked yesterday, not working today. Here's the main error. It's with Gulp... Ran gulp -v and both local and global are 3.9.0
INFO[17d08d58] Running /usr/bin/env gulp --production --no-color on localhost
cap aborted!
SSHKit::Command::Failed: gulp exit status: 256
gulp stdout: [10:25:28] Using gulpfile ...gulpfile.js
[10:25:28] Starting 'clean'...
[10:25:28] Finished 'clean' after 14 ms
[10:25:28] Starting 'default'...
[10:25:28] Starting 'wiredep'...
[10:25:28] Starting 'scssLint'...
[10:25:28] Finished 'scssLint' after 13 μs
[10:25:28] Starting 'jshint'...
[10:25:29] Starting 'browserify'...
[10:25:29] Starting 'fonts'...
[10:25:29] Starting 'images'...
[10:25:29] Finished 'default' after 1.08 s
[10:25:30] Finished 'wiredep' after 1.34 s
[10:25:30] Starting 'styles'...
gulp stderr: stream.js:94
throw er; // Unhandled stream error in pipe.
^
Error: invalid top-level expression
Any help would be greatly appreciated. I also ran capistrano-ssh-doctor and everything was working great.
FOUND IT! It was within the SASS code - there was an error and thus it did not compile properly.
I've got a problem with my CI setup.
Since a couple of days Firefox doesn't run our Jasmine tests with Karma anymore.
But Chrome does - so the error should not depend on the tests themselves.
On my development environment it runs as well.
I did not change anything on the CI-server (Ubuntu).
What happens:
Firefox is connecting to the web-server and establishes a session.
But the tests are not executed.
What I already tried:
I already changed the timeout.
I already restarted the machine (a couple of times).
And I already reinstalled firefox.
Do you have an idea, what causes this strange behaviour or how I can debug this?
We are using
karma#0.12.37
karma-jasmine#0.3.5
karma-firefox-launcher#0.1.6
Firefox v.38.0
Ubuntu
nodejs v.0.10.25
npm v 1.3.10
Xvfb
karma.conf.js
module.exports = function(config) {
config.set({
browserNoActivityTimeout: 100000,
basePath: 'src/main/webapp/',
singleRun: true,
// autoWatch: true,
logLevel: config.LOG_DEBUG,
files: [
'assets/libs/jquery/dist/jquery.min.js',
'assets/libs/angular/angular.min.js',
'assets/libs/angular-mocks/angular-mocks.js',
'assets/libs/**/*.min.js',
'app/app.js',
'app/**/*.js',
'app/directives/*/*.html',
'app/directives/*/*.js',
'../../test/frontend/**/*.js', {
pattern: 'assets/libs/**/*.map',
included: false
},
'app/views/*.html'
],
preprocessors: {
'app/views/*.html': 'ng-html2js',
'app/directives/*/*.html': 'ng-html2js'
},
frameworks: ['jasmine'],
browsers: [
'Firefox'
],
plugins: [
'karma-chrome-launcher',
'karma-firefox-launcher',
'karma-safari-launcher',
'karma-ie-launcher',
'karma-jasmine',
'karma-junit-reporter',
'karma-ng-html2js-preprocessor'
],
reporters: ['progress', 'junit'],
junitReporter: {
outputFile: '../../../build/test-results/karma-test-results.xml'
},
ngHtml2JsPreprocessor: {
moduleName: 'myc-templates'
}
});
};
Output of 'xvfb-run karma start'
INFO [karma]: Karma v0.12.37 server started at http://localhost:9876/
INFO [launcher]: Starting browser Firefox
DEBUG [temp-dir]: Creating temp dir at /tmp/karma-70931573
DEBUG [launcher]: firefox http://localhost:9876/?id=70931573 -profile /tmp/karma-70931573 -no-remote
DEBUG [web-server]: serving: /var/lib/jenkins/jobs/MYC/workspace/node_modules/karma/static/client.html
DEBUG [web-server]: serving: /var/lib/jenkins/jobs/MYC/workspace/node_modules/karma/static/karma.js
DEBUG [web-server]: serving: /var/lib/jenkins/jobs/MYC/workspace/node_modules/karma/static/favicon.ico
DEBUG [web-server]: upgrade /socket.io/1/websocket/5wtT2gW7_XuaTRZ3Gctt
DEBUG [karma]: A browser has connected on socket 5wtT2gW7_XuaTRZ3Gctt
INFO [Firefox 38.0.0 (Ubuntu 0.0.0)]: Connected on socket 5wtT2gW7_XuaTRZ3Gctt with id 70931573
DEBUG [launcher]: Firefox (id 70931573) captured in 3.542 secs
DEBUG [web-server]: serving: /var/lib/jenkins/jobs/MYC/workspace/node_modules/karma/static/context.html
DEBUG [Firefox 38.0.0 (Ubuntu 0.0.0)]: Disconnected during run, waiting 2000ms for reconnecting.
WARN [Firefox 38.0.0 (Ubuntu 0.0.0)]: Disconnected (1 times)
DEBUG [karma]: Run complete, exiting.
DEBUG [launcher]: Disconnecting all browsers
DEBUG [reporter.junit]: JUnit results written to "/var/lib/jenkins/jobs/MYC/workspace/build/test-results/karma-test-results.xml".
DEBUG [launcher]: Process Firefox exited with code 0
DEBUG [temp-dir]: Cleaning temp dir /tmp/karma-70931573
npm ERR! weird error 1
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian
npm ERR! not ok code 0
Any tipps or ideas how to solve this are very much appreciated ;-)
Thanks, Sebastian
First of all, I am pretty new to (modern) web development and I tried to import an existing project into my WebStorm and run a Grunt task.
It stops at "compass:dist" with:
$ node.exe C:\Users\lgr\AppData\Roaming\npm\node_modules\grunt-cli\bin\grunt --gruntfile C:\Users\lgr\workspace\js\rit-workshop\ui\Gruntfile.js buildall
Initializing
Command-line options: --gruntfile=C:\Users\lgr\workspace\js\rit-workshop\ui\Gruntfile.js, --verbose
Reading "Gruntfile.js" Gruntfile...OK
Registering Gruntfile tasks.
Registering "grunt-bump" local Npm module tasks.
Reading C:\Users\lgr\workspace\js\rit-workshop\ui\node_modules\grunt-bump\package.json...OK
Parsing C:\Users\lgr\workspace\js\rit-workshop\ui\node_modules\grunt-bump\package.json...OK
Loading "bump.js" tasks...OK
+ bump, bump-commit, bump-only
Registering "grunt-html2js" local Npm module tasks.
Reading C:\Users\lgr\workspace\js\rit-workshop\ui\node_modules\grunt-html2js\package.json...OK
Parsing C:\Users\lgr\workspace\js\rit-workshop\ui\node_modules\grunt-html2js\package.json...OK
Loading "html2js.js" tasks...OK
+ html2js
Registering "grunt-contrib-clean" local Npm module tasks.
Reading C:\Users\lgr\workspace\js\rit-workshop\ui\node_modules\grunt-contrib-clean\package.json...OK
Parsing C:\Users\lgr\workspace\js\rit-workshop\ui\node_modules\grunt-contrib-clean\package.json...OK
Loading "clean.js" tasks...OK
+ clean
Registering "grunt-contrib-copy" local Npm module tasks.
Reading C:\Users\lgr\workspace\js\rit-workshop\ui\node_modules\grunt-contrib-copy\package.json...OK
Parsing C:\Users\lgr\workspace\js\rit-workshop\ui\node_modules\grunt-contrib-copy\package.json...OK
Loading "copy.js" tasks...OK
+ copy
Registering "grunt-contrib-concat" local Npm module tasks.
Reading C:\Users\lgr\workspace\js\rit-workshop\ui\node_modules\grunt-contrib-concat\package.json...OK
Parsing C:\Users\lgr\workspace\js\rit-workshop\ui\node_modules\grunt-contrib-concat\package.json...OK
Loading "concat.js" tasks...OK
+ concat
Registering "grunt-contrib-cssmin" local Npm module tasks.
Reading C:\Users\lgr\workspace\js\rit-workshop\ui\node_modules\grunt-contrib-cssmin\package.json...OK
Parsing C:\Users\lgr\workspace\js\rit-workshop\ui\node_modules\grunt-contrib-cssmin\package.json...OK
Loading "cssmin.js" tasks...OK
+ cssmin
Registering "grunt-contrib-watch" local Npm module tasks.
Reading C:\Users\lgr\workspace\js\rit-workshop\ui\node_modules\grunt-contrib-watch\package.json...OK
Parsing C:\Users\lgr\workspace\js\rit-workshop\ui\node_modules\grunt-contrib-watch\package.json...OK
Loading "watch.js" tasks...OK
+ watch
Registering "grunt-contrib-jshint" local Npm module tasks.
Reading C:\Users\lgr\workspace\js\rit-workshop\ui\node_modules\grunt-contrib-jshint\package.json...OK
Parsing C:\Users\lgr\workspace\js\rit-workshop\ui\node_modules\grunt-contrib-jshint\package.json...OK
Loading "jshint.js" tasks...OK
+ jshint
Registering "grunt-contrib-uglify" local Npm module tasks.
Reading C:\Users\lgr\workspace\js\rit-workshop\ui\node_modules\grunt-contrib-uglify\package.json...OK
Parsing C:\Users\lgr\workspace\js\rit-workshop\ui\node_modules\grunt-contrib-uglify\package.json...OK
Loading "uglify.js" tasks...OK
+ uglify
Registering "grunt-karma" local Npm module tasks.
Reading C:\Users\lgr\workspace\js\rit-workshop\ui\node_modules\grunt-karma\package.json...OK
Parsing C:\Users\lgr\workspace\js\rit-workshop\ui\node_modules\grunt-karma\package.json...OK
Loading "grunt-karma.js" tasks...OK
+ karma
Registering "grunt-conventional-changelog" local Npm module tasks.
Reading C:\Users\lgr\workspace\js\rit-workshop\ui\node_modules\grunt-conventional-changelog\package.json...OK
Parsing C:\Users\lgr\workspace\js\rit-workshop\ui\node_modules\grunt-conventional-changelog\package.json...OK
Loading "changelog.js" tasks...OK
+ changelog
Registering "grunt-ngdocs" local Npm module tasks.
Reading C:\Users\lgr\workspace\js\rit-workshop\ui\node_modules\grunt-ngdocs\package.json...OK
Parsing C:\Users\lgr\workspace\js\rit-workshop\ui\node_modules\grunt-ngdocs\package.json...OK
Loading "grunt-ngdocs.js" tasks...OK
+ ngdocs
Registering "grunt-contrib-compass" local Npm module tasks.
Reading C:\Users\lgr\workspace\js\rit-workshop\ui\node_modules\grunt-contrib-compass\package.json...OK
Parsing C:\Users\lgr\workspace\js\rit-workshop\ui\node_modules\grunt-contrib-compass\package.json...OK
Loading "compass.js" tasks...OK
+ compass
Registering "grunt-contrib-requirejs" local Npm module tasks.
Reading C:\Users\lgr\workspace\js\rit-workshop\ui\node_modules\grunt-contrib-requirejs\package.json...OK
Parsing C:\Users\lgr\workspace\js\rit-workshop\ui\node_modules\grunt-contrib-requirejs\package.json...OK
Loading "requirejs.js" tasks...OK
+ requirejs
Reading package.json...OK
Parsing package.json...OK
Initializing config...OK
Loading "Gruntfile.js" tasks...OK
- watch
+ BuildCommit, after-test, archive, archiveNONmin, buildall, buildjs, buildjsCommit, buildjsNONmin, buildjsNONminCommit, css, cssmy, default, delta, incrementBuild, shell, templates, test, watch
Running tasks: buildall
Running "buildall" task
Running "clean:buildall" (clean) task
Verifying property clean.buildall exists in config...OK
Files: [no src]
Options: force=false, no-write=false
>> 0 paths cleaned.
Running "css" task
Running "compass" task
Running "compass:dist" (compass) task
Verifying property compass.dist exists in config...OK
File: [no files]
Options: config="config.rb"
Warning: spawn EPERM Use --force to continue.
Aborted due to warnings.
I tried googling a bit, but all I seem to get is that this is a permission error, but I don't know where to start to fix it.
I tried cleaning the project, reinstalling Ruby for Windows, reinstalling compass inside of ruby. Nothing worked.
Update:
I tried debugging the build and in file bin-version\index.js the line
execFile(bin, ['--version'], function (err, stdout, stderr) {
seems to throw the error as the debugger wouldn't go beyond this point. The bin is compass.bat and it looks like the build has some permission error? When I open my cmd and type "compass --version" it just works fine. I have the ruby/bin in my classpath aswell where the compass.bat is placed.
Running "compass:dist" (compass) task
Verifying property compass.dist exists in config...OK
File: [no files]
Options: config="config.rb"
Warning: spawn EPERM Use --force to continue.
Does anyone know about what could cause this error?
I solved this, but I can't tell exactly what caused it. What I can say is that it has nothing to do with compass itself, wrong permissions or Windows - it has to do with a wrong project setup. So, if you get this error, check your setup and if every dependency is available.