Skip to content

Instantly share code, notes, and snippets.

@zuhairkareem
Last active June 11, 2021 09:30
Show Gist options
  • Select an option

  • Save zuhairkareem/f9fcc19b46706889a13fcbc4e88759b0 to your computer and use it in GitHub Desktop.

Select an option

Save zuhairkareem/f9fcc19b46706889a13fcbc4e88759b0 to your computer and use it in GitHub Desktop.
Angular RSA

To fix "export 'ɵɵinject' was not found in '@angular/core' warnings after compilation

Change in package.json

"@agm/core": "^1.0.0-beta.5",

to

"@agm/core": "1.0.0",

To fix ng-inline-svg ɵɵinject error

Remove caret from ng-inline-svg in package.json

    "ng-inline-svg": "^8.2.1",

to

  "ng-inline-svg": "8.2.1",

References

  1. https://stackoverflow.com/questions/56433781/export-%c9%b5%c9%b5inject-was-not-found-in-angular-core
  2. https://stackoverflow.com/a/59161123

node-sass error during npm install

HTTP error 404 Not Found Hint: If github.com is not accessible in your location try setting a proxy via HTTP_PROXY, e.g.      

remove package-lock.json & node_modules and run npm install again

MatStep cant resolve parameters angular or Angular 7 Upgrade "export 'STEPPER_GLOBAL_OPTIONS' was not found in '@angular/cdk/stepper'

Make sure your @angular/Material and @angular/cdk packages are at the same version level.

NPM start in another port

In package.json file, change the line below
    "start": "ng serve --proxy-config proxy.conf.json --port 4201",

config module not found error

Add config.ts

export const Config = {
	dApi: {
		url: "/cms",
		secret: "ZnJvbnRlbmQ6VGZZU1Z6NzAwOV4zNzJH",
		target: 'https://rsastage.tattoo360.net/'
	},
	general: {
		agentName: "Jenny",
		dateFormat: "DD/MM/YY"
	},
	transaction: {
		vat: 0.05,
		currency: "AED"
	},
	env: "dev"
}

Upgrade Angular 7 to 8

ng update ngx-file-drop countup.js-angular2 angular-bootstrap-md

Remove angular5-csv and add angular-csv-ext instead (alhazmy13/angular-csv-ext#38)

An unhandled exception occurred: Cannot find builder "@angular-builders/custom-webpack:dev-server"

https://github.com/just-jeb/angular-builders/blob/master/MIGRATION.MD#migration-from-version-7-to-version-8

Repository is not clean.  Please commit or stash any changes before updating.

use --allow-dirty flag along with the ng update

DOCUMENT is not an exported module

Change from platform-browser to common

import { DOCUMENT } from '@angular/common';

FileDropModule not found, changed to below in shared.module.ts

import { NgxFileDropModule } from 'ngx-file-drop';

// re-run CLI schematics
ng update @angular/cli --from 7 --to 8 --migrate-only

// re-run Angular core schematics
ng update @angular/core --from 7 --to 8 --migrate-only

Scrollmagic module not found error

npm install --save @types/scrollmagic
npm i --save-dev @types/scrollmagic

Replace

import * as ScrollMagic from 'ScrollMagic';

with

import ScrollMagic from 'scrollmagic/scrollmagic/uncompressed/ScrollMagic';
node-sass with Python 2/3 issue in ubuntu

You do not need Python 2.7 in order to run node-gyp. Python 3 has been supported since version 5.0.5. If you have verified that your issue is python related, as in that node-gyp is trying to run a script which contains errors according to the python 3 interpreter, then try the following:

Update your global node-gyp install. npm install -g node-gyp Update your npm install. npm install -g npm

Remove Moment locale files

https://github.com/jmblog/how-to-optimize-momentjs-with-webpack

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment