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

Unexpected token . using --aot #2499

Closed
elvirdolic opened this issue Oct 4, 2016 · 11 comments
Closed

Unexpected token . using --aot #2499

elvirdolic opened this issue Oct 4, 2016 · 11 comments
Labels
P1 Impacts a large percentage of users; if a workaround exists it is partial or overly painful type: bug/fix

Comments

@elvirdolic
Copy link

elvirdolic commented Oct 4, 2016

Please provide us with the following information:

OS?

Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)
Windows 8

Versions.

Please run ng --version. If there's nothing outputted, please run in a Terminal: node --version and paste the result here:
angular-cli: 1.0.0-beta.16
node: 5.11.0
os: win32 x64

Repro steps.

Was this an app that wasn't created using the CLI? What change did you do on your code? etc.
ng build --prod --aot

The log given by the failure.

Normally this include a stack trace and some more information.
10% building modules 3/6 modules 3 active ...ode_modules\style-loader\addStyles
.jsSyntaxError: Unexpected token .
at WebpackResourceLoader._evaluate (C:\development\git**\node_modules@ngtools\webpack\src\resource_loader.js:75

Mention any other details that might be useful.


Thanks! We'll be in touch soon.

It doesnt occur if using wihtout --aot

@tdesmet
Copy link
Contributor

tdesmet commented Oct 5, 2016

I'm having the same issue, it crashes on the icon.css file of the @angular/material package (2.0.0-alpha.9-3)

In icon.css you have the following line: /*# sourceMappingURL=icon.css.map */
If I remove this line it continues and crashes on the next css file of @angular/material. (list.css)

$ ng build --prod --aot
10% building modules 3/6 modules 3 active ...ode_modules\style-loader\addStyles.jsC:/Workspace/diapers.tenant/node_modules/@angular/material/list/list.css:214
.ad8b839fa5fd1378d82f.bundle.map*/
^
SyntaxError: Unexpected token .
at WebpackResourceLoader._evaluate (C:\Workspace\diapers.tenant\node_modules@ngtools\webpack\src\resource_loader.js:75:24)
at C:\Workspace\diapers.tenant\node_modules@ngtools\webpack\src\resource_loader.js:95:52

@elvirdolic
Copy link
Author

I think that the webpack resource loader should support this

@choeller
Copy link

choeller commented Oct 5, 2016

Same here. Seems to crash in some CSS file...

@onedotover
Copy link

I was running into this as well. I just tried on the latest commit on master and it looks like it's been fixed.

@gitawego
Copy link

gitawego commented Oct 7, 2016

I have exactly the same problem.

@ghost
Copy link

ghost commented Oct 8, 2016

Same issue here

@filipesilva
Copy link
Contributor

Does this still happen in beta.17?

@elvirdolic
Copy link
Author

with beta.17 im receiving

ENOENT: no such file or directory, stat '..src\app\index'
Error: ENOENT: no such file or directory, stat '..\src\app\index'
at Error (native)
at Object.fs.statSync (fs.js:892:18) at _symbolImportLookup (C:\development\git..\node_modules@ngtools\webpack\src\entry_resolver.js:103:28)
at Object.resolveEntryModuleFromMain (C:\development\git..\node_modules@ngtools\webpack\src\entry_resolver.js:1
48:18)
at AotPlugin._setupOptions (C:\development\git..

@filipesilva filipesilva added type: bug/fix command: build P1 Impacts a large percentage of users; if a workaround exists it is partial or overly painful and removed needs: more info Reporter must clarify the issue labels Oct 10, 2016
@gitawego
Copy link

gitawego commented Oct 10, 2016

I got error with v1.1.0

module.path.startsWith is not a function                                                                       

just noticed the module.path is a StaticSymbol, but not a string.

@Piusha
Copy link

Piusha commented Mar 28, 2019

I also having wired issue
ERROR in Invalid or unexpected token

when build angular6 application with --aot option cant even find where the error coming from

any one having any clue

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
P1 Impacts a large percentage of users; if a workaround exists it is partial or overly painful type: bug/fix
Projects
None yet
Development

No branches or pull requests

7 participants