angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

can't serve after upgrade to 1.0.0-beta.25.5

Open alyahmedaly opened this issue 9 years ago • 6 comments

Please provide us with the following information:

OS?

windows 10

Versions.

__ _ _ __ __ _ _ _ | | __ _ _ __ ___ | |() / || '_ \ / _ || | | || | / ` || '|_ / __|| || | | (| || | | || (| || || || || (| || | |___|| ( | || | _,||| || _, | _,||| _,||| _||||| |_/ angular-cli: 1.0.0-beta.25.5 node: 6.9.2 os: win32 x64 @angular/common: 2.4.3 @angular/compiler: 2.4.3 @angular/core: 2.4.3 @angular/forms: 2.4.3 @angular/http: 2.4.3 @angular/platform-browser: 2.4.3 @angular/platform-browser-dynamic: 2.4.3 @angular/router: 3.4.3 @angular/compiler-cli: 2.4.3

Repro steps.

ng serve --port 3000 --open true

The log given by the failure.

Uncaught TypeError: Cannot convert undefined or null to object at hasOwnProperty () at Function.webpack_require.o (inline.bundle.js:136) at Object. (main.bundle.js:1827) at webpack_require (inline.bundle.js:53) at Object. (main.bundle.js:4865) at webpack_require (inline.bundle.js:53) at Object. (main.bundle.js:4654) at webpack_require (inline.bundle.js:53) at Object. (main.bundle.js:14615) at webpack_require (inline.bundle.js:53) at webpackJsonpCallback (inline.bundle.js:24) at main.bundle.js:1

my bundle is valid Hash: 82c35e8cba93eecbbd9b Time: 8538ms chunk {0} main.bundle.js, main.bundle.map (main) 721 kB {3} [initial] chunk {1} styles.bundle.js, styles.bundle.map (styles) 10.1 kB {4} [initial] [rendered] chunk {2} scripts.bundle.js, scripts.bundle.map (scripts) 375 kB {4} [initial] chunk {3} vendor.bundle.js, vendor.bundle.map (vendor) 5.69 MB [initial] chunk {4} inline.bundle.js, inline.bundle.map (inline) 0 bytes [entry] webpack: bundle is now VALID.

alyahmedaly avatar Jan 13 '17 14:01 alyahmedaly

issue resolved by replacing import * as fromInternal from './internal'; fromInternal.helpReducer

with import { helpReducer } from './internal/help-center';

any help way this was happens

alyahmedaly avatar Jan 13 '17 15:01 alyahmedaly

Hi @alyahmedaly,

I have the same issue, but I can't figure out where it's coming from.

bootstrap 64d7cd1…:135 Uncaught TypeError: Cannot convert undefined or null to object
    at hasOwnProperty (<anonymous>)
    at Function.__webpack_require__.o (bootstrap 64d7cd1…:135)
    at Object.385 (cell.transformer.ts:64)
    at __webpack_require__ (bootstrap 64d7cd1…:52)
    at Object.359 (environment.ts:16)
    at __webpack_require__ (bootstrap 64d7cd1…:52)
    at Object.361 (campaign.service.ts:11)
    at __webpack_require__ (bootstrap 64d7cd1…:52)
    at Object.581 (app.menu.ts:18)
    at __webpack_require__ (bootstrap 64d7cd1…:52)
    at Object.461 (src async:7)
    at __webpack_require__ (bootstrap 64d7cd1…:52)
    at Object.864 (main.bundle.js:3833)
    at __webpack_require__ (bootstrap 64d7cd1…:52)
    at webpackJsonpCallback (bootstrap 64d7cd1…:23)

How did you manage to find where was you issue? Also I don't have any import * in my code.

ablain avatar Jan 13 '17 18:01 ablain

  • disabled source map using -sm false
  • enabled chrome pause on exceptions start debugging and found "helpReducer" came with null i guessed it :)

for you the issue seems to be related to an import in app.menu.ts try to deep import campaign.service.ts sorry for my bad english

alyahmedaly avatar Jan 13 '17 20:01 alyahmedaly

The root cause of this issue is a bug in webpack 2.2.0-rc3 which has now been fixed in RC4: https://github.com/webpack/webpack/issues/3895

@hansl @filipesilva I modified my local angular-cli to use webpack 2.2.0-rc4 and it cleared the run time error perfectly. Many ng2 devs on github and gitter are experiencing these issues from the same root cause after upgrading to ng cli beta 25.5. Can you guys fast track this webpack dependency upgrade in the ng CLI codebase?

petercn avatar Jan 14 '17 00:01 petercn

@petercn added https://github.com/angular/angular-cli/pull/4008

filipesilva avatar Jan 14 '17 00:01 filipesilva

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.