mirkonasato / angular2-course-webpack-starter Goto Github PK
View Code? Open in Web Editor NEWSimple Angular 2 + TypeScript + Webpack starter project used in the Angular 2 From The Ground Up course.
License: MIT License
Simple Angular 2 + TypeScript + Webpack starter project used in the Angular 2 From The Ground Up course.
License: MIT License
Hi, can you please reference a javascript library to project to show how to do that
updated package.json
:
{
"name": "angular2-starter",
"version": "0.2.5",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/mirkonasato/angular2-course-webpack-starter.git"
},
"private": true,
"scripts": {
"build": "webpack --progress",
"build:prod": "cross-env APP_ENVIRONMENT=production webpack -p --progress",
"postinstall": "typings install",
"serve": "webpack-dev-server --inline --progress"
},
"dependencies": {
"@angular/common": "^4.0.3",
"@angular/compiler": "^4.0.3",
"@angular/compiler-cli": "^4.0.3",
"@angular/core": "^4.0.3",
"@angular/forms": "^4.0.3",
"@angular/http": "^4.0.3",
"@angular/platform-browser": "^4.0.3",
"@angular/platform-browser-dynamic": "^4.0.3",
"@angular/platform-server": "^4.0.3",
"@angular/router": "^4.0.3",
"core-js": "^2.4.1",
"rxjs": "^5.3.0",
"zone.js": "^0.8.8"
},
"devDependencies": {
"@ngtools/webpack": "^1.3.0",
"angular2-template-loader": "^0.6.2",
"cross-env": "^4.0.0",
"enhanced-resolve": "^3.1.0",
"html-webpack-plugin": "^2.28.0",
"raw-loader": "^0.5.1",
"rimraf": "^2.6.1",
"ts-loader": "^2.0.3",
"typescript": "^2.2.2",
"typings": "^2.1.1",
"webpack": "^2.4.1",
"webpack-dev-server": "^2.4.3"
}
}
After npm run build:prod
:
ERROR in /home/lx93uv/hub/angular2-course-webpack-starter/src/typings.d.ts (5,18): Duplicate identifier 'require'.
ERROR in /home/lx93uv/hub/angular2-course-webpack-starter/node_modules/@types/node/index.d.ts (73,13): Duplicate identifier 'require'.
ERROR in Could not resolve "./src/app/app.module" from "./src/app/app.module".
Child src/app/app.component.html:
[0] ./src/app/app.component.html 49 bytes {0} [built]
Child html-webpack-plugin for "index.html":
[0] ./~/html-webpack-plugin/lib/loader.js!./src/index.html 196 bytes {0} [built]
Child src/app/app.component.css:
[0] ./src/app/app.component.css 47 bytes {0} [built]
npm ERR! Linux 4.9.0-2-amd64
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "build:prod"
npm ERR! node v7.9.0
npm ERR! npm v4.2.0
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! [email protected] build:prod: `cross-env APP_ENVIRONMENT=production webpack -p --progress`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the [email protected] build:prod script 'cross-env APP_ENVIRONMENT=production webpack -p --progress'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the angular2-starter package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! cross-env APP_ENVIRONMENT=production webpack -p --progress
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs angular2-starter
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls angular2-starter
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/lx93uv/.npm/_logs/2017-04-22T16_35_27_098Z-debug.log
Can you help to fix it?
Hi Mirkonasato,
While i run npm install one dependency skipped "chokidar / fsevent" this due to windows os
But while i run npm run serve, i was getting the following error, Plz help me to sort out this issue.
70% 2/2 build modulesevents.js:141
throw er; // Unhandled 'error' event
Error: listen EADDRINUSE 127.0.0.1:8080
at Obect.exports._errnoException (util.js:878:11)
what should I do ?
modify the webpack.config.js can make it ? if yes ,how to configuaration?
ERROR in C:\techApps\angular2-course-webpack-starter-master\typings\globals\core
-js\index.d.ts
(635,5): error TS2300: Duplicate identifier 'prototype'.
ERROR in C:\techApps\angular2-course-webpack-starter-master\typings\globals\core
-js\index.d.ts
(646,5): error TS2300: Duplicate identifier 'done'.
ERROR in C:\techApps\angular2-course-webpack-starter-master\typings\globals\core
-js\index.d.ts
(647,5): error TS2300: Duplicate identifier 'value'.
ERROR in C:\techApps\angular2-course-webpack-starter-master\typings\globals\core
-js\index.d.ts
(759,5): error TS2300: Duplicate identifier 'prototype'.
ERROR in C:\techApps\angular2-course-webpack-starter-master\src\app\app.module.t
s
(1,26): error TS2307: Cannot find module '@angular/core'.
ERROR in C:\techApps\angular2-course-webpack-starter-master\src\app\app.module.t
s
(2,31): error TS2307: Cannot find module '@angular/platform-browser'.
ERROR in C:\techApps\angular2-course-webpack-starter-master\src\app\app.componen
t.ts
(1,27): error TS2307: Cannot find module '@angular/core'.
ERROR in ./src/main.ts
(5,32): error TS2307: Cannot find module '@angular/core'.
ERROR in ./src/main.ts
(6,40): error TS2307: Cannot find module '@angular/platform-browser-dynamic'.
is there any setup for ES6?
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.