Search Posts

Category: gulp

Gulp serve error – File not found with singular glob

I am building a web-part in SharePoint Framework using AngualrJS My gulp serve build is failing with this error and I haven’t found anything that mentions this: Error: File not found with singular glob: C:/Dev/event/typings/main.d.ts (if this was purposeful, useallowEmptyoption) at Glob.<anonymous> (C:Deveventnode_modulesglob-streamreadable.js:84:17) I tried creating an empty /typings/main.d.ts file in that directory but no luck because then I get loads of TypeScript errors like this: what’s the best way to fix this? Source: AngularJS

jsPDF PubSub Error angularjs

I’m doing an angularjs project and I’m this code to convert html page in .pdf: var element = win.document.getElementById(“printable”); html2pdf(element, { margin: 1.5, filename: ‘myPdfFile.pdf’, image: { type: ‘jpeg’, quality: 0.98 }, html2canvas: { dpi: 192, letterRendering: true }, jsPDF: { unit: ‘in’, format: ‘letter’, orientation: ‘portrait’ } }); It’s work normaly when I run localy, but in production I got this error: jsPDF PubSub Error Cannot read property ‘annotations’ of undefined TypeError: Cannot read […]

From jQuery to Webpack, NPM, Angular, SASS, Gulp, ES6, etc

I am not sure how to ask this to be honest, but I’ll give it a shot. So for many years I had worked with HTML, CSS, jQuery and PHP. Without a tertiary education I taught myself web development many years ago and was eventually able to earn a living and kind of get out of a bad situation and build a slightly better life. In essence, I got into web development out of a […]

`Error: module ".." not found from "../fake_7d442c99.`

I am using module.exports at multiple places in my application and importing it in other files using require. I know that browser can’t load the commonJS files, hence used gulp-browserify npm module to do so. But my gulp exits with the following error – Error: module “../js/ng-react-ng-deps.js” not found from “/home/neha/work/red-hat-repo/dashboard/tendrl_frontend/dist/fake_7d442c99. My gulp tasks for this are – gulp.task(“jsbundle”, [“eslint”], function() { return gulp.src(paths.jsFiles, { cwd: paths.src }) .pipe(concat(“plugin-bundle.js”)) .pipe(gulp.dest(paths.dest)); }); gulp.task(“transform”, [“jsbundle”], function() { […]

How to set up webpack in AngularJS ASP.NET MVC 5 application?

I have this project currently running on ASP.NET MVC and using AngularJS for the front end. I am using bower and gulp but want to migrate away to use new tooling, if possible webpack. I have started the migration process, where all bower packages have been moved to package.json. I need help figuring out how to set up webpack. And how the changes will affect the .NET Bundle.Config.cs file in App_Start. Basic Project structure: MyApp/ […]

Why can’t gulp-main-npm-files see angular-spinkit?

I am trying to migrate away from bower, which is serving to get the front end vendor packages needed for a project. Currently, I am using the main-bower-files library to grab all of the libraries listed under “dependencies” in bower.json in a gulpfile.js. I am trying to use gulp-main-npm-files as a replacement. To test this, I deleted angular-spinkit from bower.json and used npm-install –save. This created a new field in package.json, “dependencies”, and placed the […]

GulpUglifyError: unable to minify JavaScript Caused by: SyntaxError: Unexpected token name «k», expected punc «;»

I am getting some strange error, but in order to suppress these error I have to change everything where I am getting error? //gulp file code var fs = require(‘fs’); var path = require(‘path’);`enter code here` var merge = require(‘merge-stream’); var gulp = require(‘gulp’); var concat = require(‘gulp-concat’); var rename = require(‘gulp-rename’); var uglify = require(‘gulp-uglify’); var sourcemaps = require(‘gulp-sourcemaps’); var gutil = require(‘gulp-util’); gulp.task(‘css’,function() { return gulp.src([‘assets/css/*.css’]) .pipe(sourcemaps.init()) .pipe(sourcemaps.write()) .pipe(uglify()) .on(‘error’, function (err) { […]

Using FontAwesome with AngularJS and Gulp

I am currently using a setup with NO Bower and ONLY using NPM with Gulp for AngularJS. I installed Font-Awesome from npm. I am also using SASS/SCSS for this. The stylesheet is already loaded whenever i would run gulp serve as I have checked it using the developers tools in chrome, but the fonts are not loaded with it as I am outputted with a 404 when loading the font-awesome fonts. I used the $fa-font-path […]

How to do ahead-of-time (AOT) translation in AngularJS like in Angular 2+?

I have AngularJS version 1.5 and want to translate my web into several foreign languages. The translation will run on different domains and there will be no language change option (no countries flags etc.). There are many examples for AngularJS – but only for something like ng2 JIT (just-in-time): or Translations are done in browser at runtime. But I want to something like ng2 AOT (ahead-of-time):!#ahead-of-time-aot-vs-just-in-time-jit- … compile translations at build time […]

AngularJS hashing bundles to prevent caching

I have an AngularJS application and after every update I’ve got caching issues. So my idea was to add versioning or hashing to the bundles. I’d read about ng build -prod but that ain’t working (maybe because it only works with Angular?). Another options is maybe to use gulp to hash the bundles. Well this works but I don’t know how to get these hashed files in the index.html. I couldn’t find a simple solution […]

Next Page »