Ember hangs on JavaScript syntax error
See original GitHub issueember server stuck on “building… [Babel: project > applyPatches]” this happens when a JavaScript syntax error
I have created a new project and I’m getting the same problem things I tried to do:
- delete watchman
- reinstall package.json
- upgrade to newer version
- delete package-lock.json and node_module and reinstall
- update nodejs, update npm
and nothing work, this problem started when I did “npm update” , my old projects still working but the new ones are not
ember: 3.28.5 node: 14.19.1 npm: 6.14.16
I’m using nodenv for nodejs
and this is the last few lines of debug log
ember-auto-import:analyzer updating imports for secondproject/components/upload-fi/component.js, 179 +1m
ember-auto-import:analyzer Ignoring an unparseable file +10ms
broccoli-persistent-filter:Babel > [Babel: secondproject] [Babel: secondproject#3162 -> derivePatches#3163] found 0 files invalidated due to dependency changes. +13ms
fs-tree-diff: [Babel: secondproject#3162 -> derivePatches#3163] invalidation reason:
fs-tree-diff: before Entry { relativePath: 'secondproject/components/upload-fi/component.js', basePath: '/tmp/broccoli-2028251l6a6zVNzKjEG/out-266-analyzer_ember_auto_import_analyzer', mode: 33204, size: 176, mtime: 1648093444681 }
fs-tree-diff: entryB Entry { relativePath: 'secondproject/components/upload-fi/component.js', basePath: '/tmp/broccoli-2028251l6a6zVNzKjEG/out-266-analyzer_ember_auto_import_analyzer', mode: 33204, size: 179, mtime: 1648093517521 } +0ms
broccoli-persistent-filter:Babel > [Babel: secondproject] [Babel: secondproject#3162 -> derivePatches#3163] derivePatches duration: 2.03 ms {"patches":1,"entries":54,"invalidations":{"dependencies":0,"count":0,"duration":"0.16 ms"},"walk":{"entries":54,"duration":"1.35 ms"}} +0ms
async-promise-queue: started, with concurrency=3 +1ms
async-disk-cache get: /tmp/khaled/if-you-need-to-delete-this-open-an-issue-async-disk-cache/60752e0420d2d76e324ee36db6a8377a3f7bb400/37c1f9418ee002127298279720a594fd329cf087 +1ms
⠙ building... broccoli-persistent-filter:babel:parallel-api [Babel: secondproject#3162 -> applyPatches#3164] transformString is parallelizable +1ms
2022-03-24T03:45:17.555Z babel:config:loading:files:plugins Loaded plugin '/home/khaled/projects/thisIsMy/secondproject/node_modules/babel-plugin-htmlbars-inline-precompile/index.js' from '/home/khaled/projects/thisIsMy/secondproject'.
2022-03-24T03:45:17.556Z babel:config:loading:files:plugins Loaded plugin '/home/khaled/projects/thisIsMy/secondproject/node_modules/ember-cli-htmlbars/lib/colocated-babel-plugin.js' from '/home/khaled/projects/thisIsMy/secondproject'.
2022-03-24T03:45:17.556Z babel:config:loading:files:plugins Loaded plugin '/home/khaled/projects/thisIsMy/secondproject/node_modules/@babel/plugin-proposal-decorators/lib/index.js' from '/home/khaled/projects/thisIsMy/secondproject'.
2022-03-24T03:45:17.556Z babel:config:loading:files:plugins Loaded plugin '/home/khaled/projects/thisIsMy/secondproject/node_modules/@babel/plugin-proposal-private-property-in-object/lib/index.js' from '/home/khaled/projects/thisIsMy/secondproject'.
2022-03-24T03:45:17.556Z babel:config:loading:files:plugins Loaded plugin '/home/khaled/projects/thisIsMy/secondproject/node_modules/@babel/plugin-proposal-private-methods/lib/index.js' from '/home/khaled/projects/thisIsMy/secondproject'.
2022-03-24T03:45:17.556Z babel:config:loading:files:plugins Loaded plugin '/home/khaled/projects/thisIsMy/secondproject/node_modules/@babel/plugin-proposal-class-properties/lib/index.js' from '/home/khaled/projects/thisIsMy/secondproject'.
2022-03-24T03:45:17.556Z babel:config:loading:files:plugins Loaded plugin '/home/khaled/projects/thisIsMy/secondproject/node_modules/babel-plugin-debug-macros/src/index.js' from '/home/khaled/projects/thisIsMy/secondproject'.
2022-03-24T03:45:17.556Z babel:config:loading:files:plugins Loaded plugin '/home/khaled/projects/thisIsMy/secondproject/node_modules/babel-plugin-debug-macros/src/index.js' from '/home/khaled/projects/thisIsMy/secondproject'.
2022-03-24T03:45:17.557Z babel:config:loading:files:plugins Loaded plugin '/home/khaled/projects/thisIsMy/secondproject/node_modules/babel-plugin-module-resolver/lib/index.js' from '/home/khaled/projects/thisIsMy/secondproject'.
2022-03-24T03:45:17.557Z babel:config:loading:files:plugins Loaded plugin '/home/khaled/projects/thisIsMy/secondproject/node_modules/@babel/plugin-transform-modules-amd/lib/index.js' from '/home/khaled/projects/thisIsMy/secondproject'.
2022-03-24T03:45:17.557Z babel:config:loading:files:plugins Loaded preset '/home/khaled/projects/thisIsMy/secondproject/node_modules/@babel/preset-env/lib/index.js' from '/home/khaled/projects/thisIsMy/secondproject'.
Issue Analytics
- State:
- Created a year ago
- Reactions:7
- Comments:11 (7 by maintainers)
Top Results From Across the Web
JavaScript error handling with Ember.js · Raygun Blog
Any Error or Ember.Error that occurs in one of your callbacks will be picked up by this function. Logger.error provides the context as...
Read more >build tooling crashes on syntax-error · Issue #34 - GitHub
using ember-cli (like we do in ember) corrects this problem, and also uses a faster/better watcher and exposes ... build tooling crashes on...
Read more >Ember.js - Error when running ember --version command
... I run ember --version command outside of the app directory it works, but when I run it inside app directory it crashes...
Read more >Ember UI not loading - Build Issues
Ember UI is not loading on staging env with below error message in the ... I had a problem of a syntax error...
Read more >The 8 Most Common Mistakes That Ember.js Developers Make
2: Forgetting That Route-driven Controllers Are Singletons. Routes in Ember.js set up properties on controllers that serve as the context for the corresponding ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@rwjblue To reproduce:
app/app.js
)building... [Babel: project > applyPatches]
It also hangs when starting the app if it already has a syntax error somewhere so it’s not limited to rebuilds only.
Forcing the version of
@babel/parser
to be lower than 7.17.7 “fixes” the problem.Running the server with
CI=true JOBS=0 ember s
doesn’t really change anything. There are no error messages, it just hangs at “building…” until hitting CTRL+C when it changes to “cleaning up…” but still hangs indefinitely.The only way to recover is killing the process, fixing the syntax error, and starting the server again.