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

Error with Angular Universal build after importing MaterializeModule. #371

Open
bisak opened this issue Sep 18, 2017 · 3 comments
Open

Error with Angular Universal build after importing MaterializeModule. #371

bisak opened this issue Sep 18, 2017 · 3 comments

Comments

@bisak
Copy link

bisak commented Sep 18, 2017

What I have is this official Angular Universal demo. The problem is when I add MaterializeModule to app.module.ts I get the following error.

C:\Development\Tests\node_modules\angular2-materialize\dist\materialize-module.js:1
(function (exports, require, module, __filename, __dirname) { import { NgModule } from '@angular/core';
                                                              ^^^^^^

SyntaxError: Unexpected token import
    at createScript (vm.js:74:10)
    at Object.runInThisContext (vm.js:116:10)
    at Module._compile (module.js:588:28)
    at Object.Module._extensions..js (module.js:635:10)
    at Module.load (module.js:545:32)
    at tryModuleLoad (module.js:508:12)
    at Function.Module._load (module.js:500:3)
    at Module.require (module.js:568:17)
    at require (internal/module.js:11:18)
    at Object.JbiC (C:\Development\Tests\dist\dist-server\main.bundle.js:1:7570)

I posted on #140 but I was told that the issue there is not related to mine. I tried adding "allowJs":true as @bisubus suggested there but no success with that.

@bisubus
Copy link

bisubus commented Sep 18, 2017

@biskazz The issue is specific to your particular build. I'd suggest to post a question at Stackoverflow with provided way to replicate the problem.

@bisak
Copy link
Author

bisak commented Sep 18, 2017

I already did that and no response for 3ish days now. On the Angular Universal GitHub page there are a lot of similar issues. What can be done?
Asking here because I feel we have the highest change of finding a workaround for this particular problem if fixing it is not possible.

@enzolry
Copy link

enzolry commented Oct 31, 2017

Same problem here, it seems that this version is not universal-compatible because of the way it is bundled. Haven't found a solution for now :/

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