Giter VIP home page Giter VIP logo

Comments (6)

edemirkan avatar edemirkan commented on July 29, 2024 13

@fidergo-stephane-gourichon
If you (or anyone else) still have trouble running the sample app, I created an up-to-date version of the project. Please check https://github.com/demirk4n/material2-demo

from material2-app.

rlasjunies avatar rlasjunies commented on July 29, 2024

@jlno, I jump in the same trap.

This is due to the modification in main.ts file to support the aot.

try what's recommended:
/**

  • AoT compile.
  • First run ./node_modules/.bin/ngc -p ./src/
    */

or comment aot code, uncomment JIT code in src/main.ts and it's work. This is what I did for now.

Hope that help

from material2-app.

3kavinraj avatar 3kavinraj commented on July 29, 2024

Commenting AoT and uncommenting JIT, caused me this

E:\SANDBOX\ANGULAR2\material2-app>ng serve
patterns.map is not a function
TypeError: patterns.map is not a function
    at GlobCopyWebpackPlugin.apply (E:\SANDBOX\ANGULAR2\material2-app\node_modules\angular-cli\plugins\glob-copy-webpack-plugin.js:16:29)
    at Compiler.apply (E:\SANDBOX\ANGULAR2\material2-app\node_modules\tapable\lib\Tapable.js:270:16)
    at WebpackOptionsApply.process (E:\SANDBOX\ANGULAR2\material2-app\node_modules\webpack\lib\WebpackOptionsApply.js:59:18)
    at webpack (E:\SANDBOX\ANGULAR2\material2-app\node_modules\webpack\lib\webpack.js:28:48)
    at Class.run (E:\SANDBOX\ANGULAR2\material2-app\node_modules\angular-cli\tasks\serve-webpack.js:38:27)
    at E:\SANDBOX\ANGULAR2\material2-app\node_modules\angular-cli\commands\serve.js:108:26
    at process._tickCallback (internal/process/next_tick.js:103:7)

"First run ./node_modules/.bin/ngc -p ./src/" means what?
When to run? Where to run?!

Please help!

from material2-app.

jlno avatar jlno commented on July 29, 2024

@KavinGit this project is out of date, create a new project and import the material2.

from material2-app.

fidergo-stephane-gourichon avatar fidergo-stephane-gourichon commented on July 29, 2024

Hello. Just his same issue.

Steps to reproduce

git clone https://github.com/jelbourn/material2-app/
npm install
npm start

Expected result

Angular app served via HTTP.

Observed result

Error message:

Tried to find bootstrap code, but could not. Specify either statically analyzable bootstrap code or pass in an entryModule to the plugins options.
Error: Tried to find bootstrap code, but could not. Specify either statically analyzable bootstrap code or pass in an entryModule to the plugins options.
    at Object.resolveEntryModuleFromMain (.../material2-app/node_modules/@ngtools/webpack/src/entry_resolver.js:131:11)
    at AotPlugin._setupOptions (.../material2-app/node_modules/@ngtools/webpack/src/plugin.js:158:54)
    at new AotPlugin (.../material2-app/node_modules/@ngtools/webpack/src/plugin.js:17:14)
    at Object.exports.getWebpackNonAotConfigPartial (.../material2-app/node_modules/angular-cli/models/webpack-build-typescript.js:20:13)
    at new NgCliWebpackConfig (.../material2-app/node_modules/angular-cli/models/webpack-config.js:26:42)
    at Class.run (.../material2-app/node_modules/angular-cli/tasks/serve-webpack.js:20:22)
    at .../material2-app/node_modules/angular-cli/commands/serve.js:108:26
    at process._tickCallback (internal/process/next_tick.js:103:7)

Additional information

./node_modules/.bin/ngc -p ./src/

Error at .../material2-app/src/main.ts:25:42: Cannot find module './aot/app/app.module.ngfactory'.

Additional information

Ubuntu 16.04 AMD64

node --version

v6.9.2

from material2-app.

fidergo-stephane-gourichon avatar fidergo-stephane-gourichon commented on July 29, 2024

This is due to the modification in main.ts file to support the aot.

This practically translates to:

git checkout -- src/main.ts # revert to original repo state, don't do if you've got some local changes
git diff a16097b20774d2bd18024f77470a78f53d1fd02d..59005f6558a0a67761a8f192a84c434ef005f9f9 src/main.ts | patch -p1 -R

Seems to let things go further, still not working though, I get into same problem as @KavinGit .

@KavinGit this project is out of date, create a new project and import the material2.

What do you mean "this project is out of date"?
Can you be more explicit?
Thanks.

from material2-app.

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.