jprichardson / node-fs-extra

Node.js: extra methods for the fs object like copy(), remove(), mkdirs()
MIT License
9.47k stars 772 forks source link

fork-ts-checker-webpack-plugin-v5 fs-extra Error #904

Closed seho-dev closed 3 years ago

seho-dev commented 3 years ago

this is fork-ts-checker-webpack-plugin-v5 dependencies:

"fork-ts-checker-webpack-plugin-v5": {
          "version": "npm:fork-ts-checker-webpack-plugin@5.2.1",
          "resolved": "https://registry.npmjs.org/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-5.2.1.tgz",
          "integrity": "sha512-SVi+ZAQOGbtAsUWrZvGzz38ga2YqjWvca1pXQFUArIVXqli0lLoDQ8uS0wg0kSpcwpZmaW5jVCZXQebkyUQSsw==",
          "dev": true,
          "optional": true,
          "requires": {
            "@babel/code-frame": "^7.8.3",
            "@types/json-schema": "^7.0.5",
            "chalk": "^4.1.0",
            "cosmiconfig": "^6.0.0",
            "deepmerge": "^4.2.2",
            "fs-extra": "^9.0.0",
            "memfs": "^3.1.2",
            "minimatch": "^3.0.4",
            "schema-utils": "2.7.0",
            "semver": "^7.3.2",
            "tapable": "^1.0.0"
          }
        }

When I tried to build the program, ide reported me this error:

00:02:09.910  ERROR  SyntaxError: Unexpected token {
00:02:09.955 /Users/seho/Desktop/数字经济/finance-mini-program/node_modules/fork-ts-checker-webpack-plugin-v5/node_modules/fs-extra/lib/mkdirs/make-dir.js:85
00:02:09.967       } catch {
00:02:09.967               ^
00:02:10.001 SyntaxError: Unexpected token {
00:02:10.006     at createScript (vm.js:80:10)
00:02:10.006     at Object.runInThisContext (vm.js:139:10)
00:02:10.011     at Module._compile (module.js:616:28)
00:02:10.015     at Object.Module._extensions..js (module.js:663:10)
00:02:10.015     at Module.load (module.js:565:32)
00:02:10.036     at tryModuleLoad (module.js:505:12)
00:02:10.036     at Function.Module._load (module.js:49

My node version is all up to date, and I’m looking for a solution. There has never been such a problem in the windows environment, but the mac system I’m using now

RyanZim commented 3 years ago

Something somehow is running an older version of Node, from looking at the stack trace.

seho-dev commented 3 years ago

thank very much, i found it, it is IDE erros