parcel-bundler / parcel

The zero configuration build tool for the web. πŸ“¦πŸš€
https://parceljs.org
MIT License
43.42k stars 2.26k forks source link

πŸ› Angular5 CLI can't npm start #722

Closed tatsujb closed 6 years ago

tatsujb commented 6 years ago

πŸŽ› Configuration (.babelrc, package.json, cli command)

./package.json :

  "name": "web.ui",
  "version": "0.0.0",
  "description": "",
  "main": "./src/app/app.component.ts",
  "license": "MIT",
  "scripts": {
    "ng": "ng",
    "start": "parcel ./src/index.html",
    "build": "parcel build ./src/app/app.component.ts",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e"
  },
  "private": true,
  "dependencies": {
    "@angular/animations": "^5.2.0",
    "@angular/common": "^5.2.0",
    "@angular/compiler": "^5.2.3",
    "@angular/core": "^5.2.0",
    "@angular/forms": "^5.2.0",
    "@angular/http": "^5.2.0",
    "@angular/platform-browser": "^5.2.0",
    "@angular/platform-browser-dynamic": "^5.2.0",
    "@angular/router": "^5.2.0",
    "core-js": "^2.4.1",
    "eslint": "^4.16.0",
    "eslint-config-prettier": "^2.9.0",
    "eslint-plugin-prettier": "^2.5.0",
    "rxjs": "^5.5.6",
    "zone.js": "^0.8.19"
  },
  "devDependencies": {
    "@angular/cli": "1.6.6",
    "@angular/compiler-cli": "^5.2.3",
    "@angular/language-service": "^5.2.0",
    "@types/jasmine": "~2.8.3",
    "@types/jasminewd2": "~2.0.2",
    "@types/node": "~6.0.60",
    "codelyzer": "^4.0.1",
    "jasmine-core": "~2.8.0",
    "jasmine-spec-reporter": "~4.2.1",
    "karma": "~2.0.0",
    "karma-chrome-launcher": "~2.2.0",
    "karma-coverage-istanbul-reporter": "^1.2.1",
    "karma-jasmine": "~1.1.0",
    "karma-jasmine-html-reporter": "^0.2.2",
    "parcel-bundler": "^1.5.1",
    "parcel-plugin-angular": "^0.5.0",
    "protractor": "~5.1.2",
    "ts-node": "~4.1.0",
    "tslint": "~5.9.1",
    "typescript": "^2.5.3"
  }
}

./src/index.html :

<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>Web.Ui</title>
  <base href="/">

  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="icon" type="image/x-icon" href="favicon.ico">
</head>
<body>
  <app-root></app-root>
</body>
</html>

./src/app/app.component.ts :

import { Component } from '@angular/core';

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.css']
})
export class AppComponent {
  title = 'app';
}

πŸ€” Expected Behavior

compiled and served angular-cli.

😯 Current Behavior

"C:\Program Files\JetBrains\WebStorm 173.3942.6\bin\runnerw.exe" "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" start

> web.ui@0.0.0 start C:\Users\j_bard\WebstormProjects\AirConnect\web\web.ui
> parcel ./src/index.html

Server running at http://localhost:1234 
∞  Building...
{ Error: listen EACCES C:\Users\j_bard\AppData\Local\Temp\tmp-75325L0vQRmENhoy
    at Object._errnoException (util.js:1022:11)
    at _exceptionWithHostPort (util.js:1044:20)
    at Server.setupListenHandle [as _listen2] (net.js:1334:19)
    at listenInCluster (net.js:1392:12)
    at Server.listen (net.js:1487:5)
    at Function.listen (C:\Users\j_bard\WebstormProjects\AirConnect\web\web.ui\node_modules\express\lib\application.js:618:24)
    at new Server (C:\Users\j_bard\WebstormProjects\AirConnect\web\web.ui\node_modules\parcel-plugin-typescript\build\ipc\server.js:27:14)
    at new AngularServer (C:\Users\j_bard\WebstormProjects\AirConnect\web\web.ui\node_modules\parcel-plugin-angular\build\backend\worker\index.js:74:9)
    at module.exports (C:\Users\j_bard\WebstormProjects\AirConnect\web\web.ui\node_modules\parcel-plugin-angular\build\index.js:22:24)
    at Bundler.loadPlugins (C:\Users\j_bard\WebstormProjects\AirConnect\web\web.ui\node_modules\parcel-bundler\src\Bundler.js:135:17)
    at <anonymous>
  code: 'EACCES',
  errno: 'EACCES',
  syscall: 'listen',
  address: 'C:\\Users\\j_bard\\AppData\\Local\\Temp\\tmp-75325L0vQRmENhoy',
  port: -1 }
∞  Building index.html...∞  Building favicon.ico...√  Built in 1.57s.

the page title and favicon is correct but it's otherwise blank.

πŸ”¦ Context

trying to set up a front in angular 5 served with parcel

🌍 Your Environment

Software Version(s)
Parcel ^1.5.1
Node 8.9.4
npm/Yarn 5.6.0
Operating System windows 10 pro
fathyb commented 6 years ago

Hey, this is a parcel-plugin-angular bug, I opened an issue there for you and I'm closing this one.