tomwayson / esri-angular-cli-example

Example of how to to use the ArcGIS API for JavaScript in an Angular CLI app

Home Page:https://tomwayson.github.io/esri-angular-cli-example

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Module build failed: TypeError: Cannot read property 'newLine' of undefined

tyler-austin opened this issue · comments

node.js:

C:\angular-fun\ng-cli-ex\esri-angular-cli-example>ng serve
** NG Live Development Server is running on http://localhost:4200. **
Hash: 62cf193ea9a643266b27
Time: 6733ms
chunk    {0} main.bundle.js, main.bundle.map (main) 58.8 kB {2} [initial] [rendered]
chunk    {1} styles.bundle.js, styles.bundle.map (styles) 30.9 kB {3} [initial] [rendered]
chunk    {2} vendor.bundle.js, vendor.bundle.map (vendor) 176 kB [initial] [rendered]
chunk    {3} inline.bundle.js, inline.bundle.map (inline) 0 bytes [entry] [rendered]

ERROR in AppModule is not an NgModule

ERROR in ./src/main.ts
Module build failed: TypeError: Cannot read property 'newLine' of undefined
    at Object.getNewLineCharacter (.....\esri-angular-cli-example\node_modules\typescript\lib\typescript.js:8062:20)
    at Object.createCompilerHost (.....\esri-angular-cli-example\node_modules\typescript\lib\typescript.js:44978:26)
    at Object.ngcLoader (......\esri-angular-cli-example\node_modules\@ngtools\webpack\src\loader.js:341:33)
 @ multi webpack-dev-server/client?http://localhost:4200/ ./src/main.ts
webpack: Failed to compile.

debug.log

[0216/175329.131:ERROR:crashpad_client_win.cc(454)] CreateProcess: Access is denied. (0x5)
[0216/175343.509:ERROR:crashpad_client_win.cc(454)] CreateProcess: Access is denied. (0x5)
[0216/175346.740:ERROR:crashpad_client_win.cc(454)] CreateProcess: Access is denied. (0x5)

{
  "name": "esri-angular-cli-example",
  "version": "0.3.0",
  "license": "MIT",
  "angular-cli": {},
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "lint": "tslint \"src/**/*.ts\" --project src/tsconfig.json --type-check && tslint \"e2e/**/*.ts\" --project e2e/tsconfig.json --type-check",
    "test": "ng test",
    "pree2e": "webdriver-manager update --standalone false --gecko false",
    "e2e": "protractor",
    "typings": "cd src && typings install",
    "postinstall": "npm run typings"
  },
  "private": true,
  "dependencies": {
    "@angular/common": "^2.3.1",
    "@angular/compiler": "^2.3.1",
    "@angular/core": "^2.3.1",
    "@angular/forms": "^2.3.1",
    "@angular/http": "^2.3.1",
    "@angular/material": "^2.0.0-beta.1",
    "@angular/platform-browser": "^2.3.1",
    "@angular/platform-browser-dynamic": "^2.3.1",
    "@angular/router": "^3.3.1",
    "angular2-esri-loader": "^0.1.11",
    "angular2-esri4-components": "^0.5.0",
    "core-js": "^2.4.1",
    "hammerjs": "^2.0.8",
    "rxjs": "^5.0.1",
    "ts-helpers": "^1.1.1",
    "zone.js": "^0.7.2"
  },
  "devDependencies": {
    "@angular/compiler-cli": "^2.3.1",
    "@types/jasmine": "2.5.38",
    "@types/node": "^6.0.42",
    "angular-cli": "1.0.0-beta.26",
    "codelyzer": "~2.0.0-beta.1",
    "jasmine-core": "2.5.2",
    "jasmine-spec-reporter": "2.5.0",
    "karma": "1.2.0",
    "karma-chrome-launcher": "^2.0.0",
    "karma-cli": "^1.0.1",
    "karma-jasmine": "^1.0.2",
    "karma-remap-istanbul": "^0.2.1",
    "protractor": "~4.0.13",
    "ts-node": "1.2.1",
    "tslint": "^4.3.0",
    "typescript": "~2.0.3"
  }
}

Did you modify the code at all?

The following works fine for me.

git clone https://github.com/tomwayson/esri-angular-cli-example.git
cd esri-angular-cli-example
npm i
ng serve

What OS and node version? I'm on OSX with:

➜  esri-angular-cli-example git:(master) node -v            
v6.3.0
➜  esri-angular-cli-example git:(master) npm -v
3.10.3

That doesn't strictly meet the angular-cli prerequisites, but it works on my machine.

What angular-cli version?

➜ esri-angular-cli-example git:(master) ng version
angular-cli: 1.0.0-beta.19-3
node: 6.3.0
os: darwin x64

Are you able to create a new angular-cli app and run it?

I uninstalled the latest version of angular-cli and then installed angular-cli@1.0.0-beta.26, I was then able to install and serve the esri-angular-cli-example

thanks Tom, you rock!