Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
alyahmedaly opened this issue Jan 13, 2017 · 6 comments · Fixed by #4008
Closed

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

alyahmedaly opened this issue Jan 13, 2017 · 6 comments · Fixed by #4008

Comments

@alyahmedaly
Copy link

alyahmedaly commented Jan 13, 2017

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
Copy link
Author

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

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

any help way this was happens

@ablain
Copy link

ablain commented Jan 13, 2017

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.

@alyahmedaly
Copy link
Author

  • 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

@petercn
Copy link

petercn commented Jan 14, 2017

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?

@filipesilva
Copy link
Contributor

@petercn added #4008

@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants