我正在尝试创建一个迁移,但是它抛出以下错误
yarn run v1.6.0
(node:14212) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usabil
ity issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods in
stead.
$ babel-node node_modules/.bin/knex migrate:make create_linky_table
C:\Users\Sagar\Desktop\linky\api\node_modules\.bin\knex:2
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
^^^^^^^
SyntaxError: missing ) after argument list
at new Script (vm.js:79:7)
at createScript (vm.js:251:10)
at Object.runInThisContext (vm.js:303:10)
at Module._compile (internal/modules/cjs/loader.js:656:28)
at Module._extensions..js (internal/modules/cjs/loader.js:699:10)
at Object.newLoader [as .js] (C:\Users\Sagar\Desktop\linky\lms-linky\api\node_modules\pi
rates\lib\index.js:88:7)
at Module.load (internal/modules/cjs/loader.js:598:32)
at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
at Function.Module._load (internal/modules/cjs/loader.js:529:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:741:12)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
我在package.json中的脚本中设置了以下内容:
"knex": "babel-node --require ./node_modules/dotenv/config node_modules/.bin/knex --knexfile='src/knexfile.js'",
我正在使用以下代码创建迁移:
yarn knex make:migration create_linky_table
目前我正在使用Windows系统,我看到了这个解答。这可能是Windows系统的问题吗?