question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How do I solve this problem ? It shows when I commit some changes!!!


× node ./scripts/lint-prettier.js found some errors. Please fix them and try committing again.

E:\idea\test\ant-design-pro\scripts\lint-prettier.js:44
  .finally(() => {
          ^

TypeError: Promise.all(...).then(...).catch(...).finally is not a function
  at files.forEach.file (E:\idea\test\ant-design-pro\scripts\lint-prettier.js:44:13)
  at Array.forEach (<anonymous>)
  at Object.<anonymous> (E:\idea\test\ant-design-pro\scripts\lint-prettier.js:18:7)
  at Module._compile (module.js:652:30)
  at Object.Module._extensions..js (module.js:663:10)
  at Module.load (module.js:565:32)
  at tryModuleLoad (module.js:505:12)
  at Function.Module._load (module.js:497:3)
  at Function.Module.runMain (module.js:693:10)
  at startup (bootstrap_node.js:191:16)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ant-design-pro@2.2.1 lint-staged: `lint-staged`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ant-design-pro@2.2.1 lint-staged script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
Jornvecommented, Mar 12, 2019

@jdfdcc You can use NVM to manage multiple versions of node. The solution is indeed to upgrade your local node version to 10.15 or higher.

Suggestion: As most of us are developers and can speak and write english, maybe it’s a good idea to start using English as main language instead of Chinese. This way we will get a much more active and international community!

1reaction
chenshuai2144commented, Mar 4, 2019

你可以删除 ant-design-pro\scripts\lint-prettier.js 的finally 方法,改成顺序执行不用finally

Read more comments on GitHub >

github_iconTop Results From Across the Web

Github windows: Commit failed: Failed to create a new commit
I get this error: Commit failed: Failed to create a new commit. That seems that nobody is having. I've already deleted the folder...
Read more >
Troubleshoot Commit Failures - Palo Alto Networks
Panorama commit failure or template, device group, or Collector Group push failure. The Panorama management server has an earlier software ...
Read more >
Recover failed Git commit message - Sal Ferrarello
When you are using Git commit validation (a.k.a. commit linting) and it fails, it is frustrating to re-type your message.
Read more >
Direct fetching of commit failed - DeployHQ
Direct fetching of that commit failed. or: error: Server does not allow request for unadvertised object 123456 Fetched in submodule path 'path/to/submodule ...
Read more >
Commit-failed recovery - IBM
A commit failure is one that occurs during the commit stage of a unit of work (either following the prepare phase of two-phase...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found