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
Ionic - Module parse failed: Unexpected token (6:2160) #13767
Comments
Hi thanks for reporting this. However this seems to be related to a webpack issue webpack/webpack#8656 and npm bug https://npm.community/t/packages-with-peerdependencies-are-incorrectly-hoisted/4794 |
@alan-agius4 so when the Webpack issue will be solved it will be included in the Cli right? |
The root cause of this is actually npm, and how it dedupes modules. If you use yarn you should not experience this issue. However, if if webpack do find a workaround and implement it, it will be included in the CLI when we cut another release. |
@alan-agius4 thx for the answer and explanation, really cool. understood 👍 |
I have the same issue. What should I do? fallback to How can I get rid of this error right now? |
@piernik, some workarounds are available here webpack/webpack#8656 (comment) and webpack/webpack#8656 (comment) Alternativly, you can downgrade the That said, I am going to re-open this, to discuss if we should rollback to an older version of webpack as there was another report of this issue being encountered. Side note: if we revert back so should will this feature Line 296 in 78f5c28
It’s important to note that this issue is being caused by npm and the actual bug has been around since npm 3. (webpack/webpack#8656 (comment)) |
I got back to Edit: for me (and I think for many unexperienced users) |
I looked at this a bit more. And from the reproduction above I managed to get this fixed by removing the rm -rf node_modules
rm -f package-lock.json
npm install Executing
|
@piernik & @peterpeterparker can you kindly confirm if this works for you as well? |
@alan-agius4 "just" removing Ping me if you need more tests |
@peterpeterparker Can you try a full clean install as well (i.e., also |
it's what I meant, I do full clean (see the description of the issue) |
Ah. Sorry. I read the " "just" removing |
no worries at all, if I could help with more testing, sure ping me |
@peterpeterparker, I tried on another machine, and I am still unable to replicate this issue when remove the
|
@alan-agius4 which node and npm version are u using? you are testing with my demo repo? |
Yeah, I trying with your reproduction. I tried the following |
@alan-agius4 @clydin I tried again and again and finally it worked out 🎉 to double check I even took the time to do update all libs in my client's project, went with the same process and it went fine too 🎉 therefore I think we could close this issue, thx a lot for the support. I'm curious which lib was the problem but I'm happy with a solution ;) for the record
now is ok. |
Sadly it is not working for me. I still get And here is mine
|
This is what we did to get around it. |
Removing
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
🐞 Bug report
Command (mark with an
x
)Is this a regression?
Yes kind of
Description
I, we, are upgrading our application's Angular and Cordova-ios versions and while doing so, if we remove the
package-lock.json
and fetch all the libraries newly, are facing the following an error when we run afterwards our application doingionic serve
:I say we as the problem has been reported on the Ionic forum https://forum.ionicframework.com/t/incompatibility-to-cordova-ios-5-0-0 and Ionic GitHub ionic-team/ionic-framework#17605
🔬 Minimal Reproduction
Note: if you don't face the error doing the above list of commands, then delete the
package-lock.json
and fetch the libraries again🔥 Exception or Error
🌍 Your Environment
Anything else relevant?
The text was updated successfully, but these errors were encountered: