Skip to content
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

Cannot find name XXX on startup or recompile #36

Closed
pwilms opened this issue Jun 17, 2016 · 5 comments
Closed

Cannot find name XXX on startup or recompile #36

pwilms opened this issue Jun 17, 2016 · 5 comments

Comments

@pwilms
Copy link

pwilms commented Jun 17, 2016

Same problem as described in bug #1 . No of the fixes worked for me. npm start displays the following errors:


331ms build modules   
38ms seal
211ms optimize
33ms hashing
38ms create chunk assets
7ms additional chunk assets 
0ms optimize chunk assets 
214ms optimize assets
99ms emit
Hash: 433c68f8980a8f328adf
Version: webpack 1.13.1
Time: 2231ms
         Asset     Size  Chunks             Chunk Names
main.bundle.js  8.68 MB       1  [emitted]  main
   initial.css  60.5 kB       1  [emitted]  main
chunk    {0} polyfills.bundle.js (polyfills) 461 kB
     + 336 hidden modules
chunk    {1} main.bundle.js, initial.css (main) 3.23 MB {2} [rendered]
  [649] ./src/app/app.menu.ts 3.91 kB {1} [built]
       ... -> factory:0ms building:137ms
     + 555 hidden modules
chunk    {2} vendor.bundle.js (vendor) 2.91 MB {0}
     + 372 hidden modules
Child html-webpack-plugin for "index.html":
    chunk    {0} index.html 519 kB
         + 3 hidden modules
webpack: bundle is now VALID.
[default] Checking started in a separate process...
[default] /home/ubuntu/workspace/ng2-admin/node_modules/@angular/common/src/directives/ng_class.d.ts:72:35 
    Cannot find name 'Set'.
[default] /home/ubuntu/workspace/ng2-admin/node_modules/@angular/common/src/facade/async.d.ts:27:33 
    Cannot find name 'Promise'.
[default] /home/ubuntu/workspace/ng2-admin/node_modules/@angular/common/src/facade/async.d.ts:28:45 
    Cannot find name 'Promise'.
[default] /home/ubuntu/workspace/ng2-admin/node_modules/@angular/common/src/facade/lang.d.ts:4:17 
    Cannot find name 'Map'.
[default] /home/ubuntu/workspace/ng2-admin/node_modules/@angular/common/src/facade/lang.d.ts:5:17 

[default] /home/ubuntu/workspace/ng2-admin/src/app/theme/services/baThemePreloader/baThemePreloader.service.ts:16:24 
    Cannot find name 'Promise'.
[default] /home/ubuntu/workspace/ng2-admin/src/app/theme/services/baThemePreloader/baThemePreloader.service.ts:17:16 
    Cannot find name 'Promise'.
[default] /home/ubuntu/workspace/ng2-admin/src/app/theme/services/baThemePreloader/baThemePreloader.service.ts:24:7 
    Cannot find name 'Promise'.
[default] /home/ubuntu/workspace/ng2-admin/src/app/theme/theme.configProvider.ts:80:5 
    Cannot find name '_'.
[default] /home/ubuntu/workspace/ng2-admin/src/app/theme/theme.configProvider.ts:84:5 
    Cannot find name '_'.
[default] /home/ubuntu/workspace/ng2-admin/src/main.browser.ts:23:46 
    Cannot find name 'Promise'.
[default] /home/ubuntu/workspace/ng2-admin/src/main.browser.ts:51:15 
    Cannot find name 'require'.
[default] /home/ubuntu/workspace/ng2-admin/src/main.browser.ts:52:36 
    Cannot find name 'module'.
[default] /home/ubuntu/workspace/ng2-admin/src/polyfills.ts:12:1 
    Cannot find name 'require'.

I've tried:

  • node 4.2.1
  • node 6.2.1
  • windows & linux

Install:

  • npm install --global webpack webpack-dev-server typings typescript bower
  • typings install
  • bower install
  • npm start

I've also tried global [email protected] as it's in the dev requirements.

What's interesting the application seems to work and reloads correctly. Currently i'm ignoring those errors. Anybody can confirm this issue?

@cskang-darae
Copy link

same problem I am suffering...

@cskang-darae
Copy link

When i tried to typings install it give me error that

typings WARN deprecated 2016-06-19: "registry:dt/lodash#3.10.0+20160330154726" is deprecated (updated, replaced or removed)
typings ERR! message Attempted to compile "zone.js" as an external module, but it looks like a global module. You'll need to enable the global option to continue.

typings ERR! cwd /home/darae/ng2-admin
typings ERR! system Linux 4.4.0-24-generic
typings ERR! command "/home/darae/.nvm/versions/node/v6.2.2/bin/node" "/home/darae/.nvm/versions/node/v6.2.2/bin/typings" "install"
typings ERR! node -v v6.2.2
typings ERR! typings -v 1.3.0

typings ERR! If you need help, you may report this error at:
typings ERR!   <https://github.com/typings/typings/issues>

So I just move zone.js from dependencies to globalDependencies and typings install was fine but

still above issue happens.

I just check https://github.com/AngularClass/angular2-webpack-starter/blob/master/typings.json , it doesn't have the zone.js.

This is what I tried and searched.

@cskang-darae
Copy link

I solved this issue.

I just apply the modification from PatrickJS/PatrickJS-starter@fe6a1de (updating typings module).

and it works fine.

I guss this project is based on angular2-webpack-starter so

the maintainer of this project should catch out the changes from angular2-webpack-starter.

@nnixaa
Copy link
Collaborator

nnixaa commented Jun 20, 2016

@cskang-darae this is in progress and will be released soon as well as update to angular rc.2

@nnixaa
Copy link
Collaborator

nnixaa commented Jun 21, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants