📅  最后修改于: 2023-12-03 14:44:37.637000             🧑  作者: Mango
As a developer, you may encounter errors when running your Node.js scripts, such as the "node-lambda run error fs-extra\lib\mkdirs\make-dir.js } catch { Unexpected token - Javascript" error. This error message indicates that there is an issue with the "make-dir.js" file in the "fs-extra" library.
Here are some possible causes of this error:
To resolve the "node-lambda run error fs-extra\lib\mkdirs\make-dir.js } catch { Unexpected token - Javascript" error, you can take the following steps:
Check your Node.js version and ensure that it is compatible with the version of the "fs-extra" library you are using. For example, if you are using Node.js v10.x, check if the version of the "fs-extra" library you are using supports Node.js v10.x.
Double-check your code for syntax errors, especially in the "make-dir.js" file. Use a code editor or syntax checker to assist you in identifying syntax errors.
Verify that you have installed the "fs-extra" library correctly. You can do this by uninstalling and re-installing the library or reviewing the installation instructions for the library.
Review the file path for the "make-dir.js" file and ensure that it is correct. Make sure that the file exists in the specified location.
The "node-lambda run error fs-extra\lib\mkdirs\make-dir.js } catch { Unexpected token - Javascript" error can be frustrating and time-consuming to troubleshoot. By following the troubleshooting steps above, you should be able to resolve the issue and get your Node.js script running as intended.