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

Module build failed #3

Open
ramangreat opened this issue Mar 1, 2017 · 7 comments
Open

Module build failed #3

ramangreat opened this issue Mar 1, 2017 · 7 comments

Comments

@ramangreat
Copy link

Hi Mark,

When I run the command npm run watch, I get the following two errors:

Webpack is watching the files…

Hash: 50711b5147ccc9e79153f6370f9ee8103b9e01a3
Version: webpack 2.1.0-beta.27
Child
Hash: 50711b5147ccc9e79153
Version: webpack 2.1.0-beta.27
Time: 18772ms
Asset Size Chunks Chunk Names
main.bundle.js 2.92 MB 0 [emitted] main
main.bundle.js.map 3.14 MB 0 [emitted] main
[209] ./src async 160 bytes {0} [built]
+ 335 hidden modules

ERROR in ./src/platform-modules/browser.module.js
Module build failed: SyntaxError: Unexpected token (35:0)

  33 | export const UNIVERSAL_KEY = 'UNIVERSAL_CACHE';
  34 | 
> 35 | @NgModule({
     | ^
  36 |   bootstrap: [ AppComponent ],
  37 |   imports: [
  38 |     // MaterialModule.forRoot() should be included first

 @ ./src/client.js 17:0-63

Child
Hash: f6370f9ee8103b9e01a3
Version: webpack 2.1.0-beta.27
Time: 16085ms
Asset Size Chunks Chunk Names
index.js 2.73 MB 0 [emitted] main
index.js.map 2.89 MB 0 [emitted] main
[208] ./src async 160 bytes {0} [built]
+ 341 hidden modules

ERROR in ./src/platform-modules/node.module.js
Module build failed: SyntaxError: Unexpected token (27:0)

  25 | export const UNIVERSAL_KEY = 'UNIVERSAL_CACHE';
  26 | 
> 27 | @NgModule({
     | ^
  28 |   bootstrap: [ AppComponent ],
  29 |   imports: [
  30 |     // MaterialModule.forRoot() should be included first

Can you please let me know what is wrong here?

Thanks
Raman

@MarkPieszak
Copy link
Owner

MarkPieszak commented Mar 1, 2017

Interesting, did it succesfully install everything from npm install ?
Does the npm start command work?

I need to clean up the project in general sometime, it's a port of our Universal-starter that's TypeScript based, think there's a few things that need tweaking/fixing!

If you find anything let me know, PR's are always appreciated! 💯 @ramangreat

@rkumarat
Copy link

rkumarat commented Mar 1, 2017

Thanks Mark for your reply.

It has installed everything. I will install it again if there is anything left to check thoroughly. The npm start command also throws this error I mentioned above.

Actually I want to use it only for the frontend and for the backend I am using hapi.js for api. As hapi.js's documentation would be in es6 only.

I was thinking there would be a lot of confusion if I use typescript for angular 2 and es6 for hapi.js. Is it right?

Thanks
Raman

@MarkPieszak
Copy link
Owner

I've actually never tried that to be honest, but I would think in theory it'd be okay, since you could just have separate webconfig bundles and have the loaders be different for both the Client and Server bundles.

Let me know what issues are coming up I'll see if I can take a look! Super swamped at the moment :(

@rkumarat
Copy link

rkumarat commented Mar 1, 2017

I am new to both the technologies.

@MarkPieszak
Copy link
Owner

You could write Hapi in TypeScript as well, you just use webpack to handle it.

Take a look at the Universal-Starter that's written in TypeScript (using Express), and you can just replace the Express with Hapi instead, that should get you on the right track!

@rkumarat
Copy link

rkumarat commented Mar 1, 2017

I think that is a good idea. I will install Universal-Starter (Typescript).

@rkumarat
Copy link

rkumarat commented Mar 1, 2017

Thank you very much Mark.

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

3 participants