Giter Site home page Giter Site logo

Comments (4)

fulls1z3 avatar fulls1z3 commented on May 12, 2024

Hi @JochemKuijpers,

First of all I'd like to thank you for all the detailed information above, and also for accelerating testing of ng2-metadata: I was actually planning to test it nowadays using the latest angular (2.4.1) at the moment - so you gave me a chance for it :)

I cloned your repo derp, performed an npm install, ran ng build --aot, and I also got some compile errors, similar to yours:

ERROR in Error encountered resolving symbol values statically. Could not resolve ng2-metadata relative to C:/Users/fulls1z3/Source/Repos/derp/src/app/app.module.ts., resolving symbol AppModule in C:/Users/fulls1z3/Source/Repos/derp/src/app/app.module.ts, resolving symbol AppModule in C:/Users/fulls1z3/Source/Repos/derp/src/app/app.module.ts, resolving symbol AppModule in C:/Users/fulls1z3/Source/Repos/derp/src/app/app.module.ts

ERROR in ./src/main.ts
Module not found: Error: Can't resolve './$$_gendir/app/app.module.ngfactory' in 'C:\Users\fulls1z3\Source\Repos\derp\src'
 @ ./src/main.ts 4:0-74
 @ multi main

ERROR in ./~/@angular/core/src/linker/system_js_ng_module_factory_loader.js
Module not found: Error: Can't resolve 'C:\Users\fulls1z3\Source\Repos\derp\src\$$_gendir' in 'C:\Users\fulls1z3\Source\Repos\derp\node_modules\@angular\core\src\linker'
 @ ./~/@angular/core/src/linker/system_js_ng_module_factory_loader.js 69:15-36 85:15-102
 @ ./~/@angular/core/src/linker.js
 @ ./~/@angular/core/src/core.js
 @ ./~/@angular/core/index.js
 @ ./src/main.ts
 @ multi main

Then, I created a new ng project (using ng new derp2) using the latest angular-cli (1.0.0-beta.24) at the moment, and tested ng2-metadata. Results were good, I observed that aot build succeeded without errors:

C:\Users\fulls1z3\Source\Repos\derp2>ng build --aot
Hash: 12080e0862bf80ecb0ce
Time: 28073ms
chunk    {0} main.bundle.js, main.bundle.map (main) 33.3 kB {2} [initial] [rendered]
chunk    {1} styles.bundle.css, styles.bundle.map, styles.bundle.map (styles) 1.77 kB {3} [initial] [rendered]
chunk    {2} vendor.bundle.js, vendor.bundle.map (vendor) 1.7 MB [initial] [rendered]
chunk    {3} inline.bundle.js, inline.bundle.map (inline) 0 bytes [entry] [rendered]

Then I cleaned the node_modules dir of solution derp, fixed the dependencies according to derp2 and ran ng build --aot on derp and it failed again.

For that reason, I suggest you to have a look at the attached solution which has been built using the latest angular-cli and angular components, and let me know about the status.

Hope we will succeed with it!

derp2.zip

from ngx-meta.

JochemKuijpers avatar JochemKuijpers commented on May 12, 2024

I've adapted my project and copied the versions from the package.json in your zip archive. This indeed fixes the compiling error. Thanks, my issue is now resolved.

from ngx-meta.

slegaitis avatar slegaitis commented on May 12, 2024

I'm having same issue with Angular 4.4.4 and ng2-metadata 2.0.1 :( With Aot compiler too.

Any ideas?

from ngx-meta.

fulls1z3 avatar fulls1z3 commented on May 12, 2024

@tauciokas as seen as on npm ng2-metadata is no longer supported and has been deprecated. Please use the @ngx-meta/core package instead.

from ngx-meta.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.