bigless27 / angular-webpack-starter Goto Github PK
View Code? Open in Web Editor NEWA simple starter setup for building a scalable project with Angular and Webpack
License: MIT License
A simple starter setup for building a scalable project with Angular and Webpack
License: MIT License
Use this template below for bugs.
In trying to follow along with the video tutorial and provided files for download, users will run into numerous problems. 2 of the 3 problems mentioned here have remedies as provided. With limited understanding of Angular environment setup, the 3rd problem becomes a 'halt'.
One can expect to copy command-line examples as provided by instructor with successful output, mirroring the instructors video.
First issue:
TS2304: Cannot find name ‘require’ ERROR in [at-loader] in ./src/app/app.component.ts and ./src/polyfills.ts
Second issue:
There is also the following error while running ‘npm run webpack-prod’:
‘output.filename’ is required, either in config file or as --output-filename.
Third issue:
ERROR in chunk app [initial]
webpack.prod.js
Conflict: Multiple assets emit to the same filename webpack.prod.js
ERROR in chunk polyfills [entry]
webpack.prod.js
Conflict: Multiple assets emit to the same filename webpack.prod.js
Issue one:
This I can fix by placing the following in tsconfig.json and tsconfig-aot.json compilerOptions section:
“typeRoots”: [
“node_modules/@types”
]
Issue two:
This I can fix by changing the syntax of the command to: 'npm run webpack-prod --config config/webpack.prod.js
Issue three:
Beyond the scope of a user trying to learn from a video tutorial.
I am trying to understand the Uglify section of the tutorial which bundles the .js files to compare size in production section of tutorial.
Angular beginner issues.
It also may be helpful to explain what helper.js file is and what the .gitignore file is for
Comments under the video, or a video overlay with current instructions/fixes would be helpful
First of all thank you for the tutorial on Youtube. I found it really helpful.
npm run build-aot-prod give Error File: /Angular-webpack-starter-master/**.spec.ts' not found.
build successfully using aot
npm run build-aot-prod
give
Error File: /Angular-webpack-starter-master/**.spec.ts' not found.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build:aot: `ngc -p tsconfig-aot.json`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build:aot script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/kaushalya/.npm/_logs/2018-02-03T05_23_24_168Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build-aot-prod: `npm run build:aot && npm run webpack-prod`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build-aot-prod script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/kaushalya/.npm/_logs/2018-02-03T05_23_24_245Z-debug.log
Works when
in tsconfig-aot.js change
"files": ["src/app/app.module.ts", "src/main.aot.ts", "**.spec.ts"],
to
"files": ["src/app/app.module.ts", "src/main.aot.ts"]
But since I think **.spec.ts is for testing removing it is not an solution.
Linux Mint 18.3
Please Help
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.