当我尝试运行yarn eject
时,在create-react-app
上运行yarn start
后,终端显示如下错误:
$ node scripts/start.js
path.js:39
throw new ERR_INVALID_ARG_TYPE('path', 'string', path);
^
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. R
eceived type undefined
at assertPath (path.js:39:11)
at Object.resolve (path.js:168:7)
at Object.<anonymous> (C:\projects\aditya-portfolio\config\webpack.config.d
ev.js:193:39)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:20:18)
at Object.<anonymous> (C:\projects\aditya-portfolio\scripts\start.js:31:16)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this com
mand.
我试图在webpack配置文件中配置SCSS,但是在尝试运行yarn start
后进行配置后,它总是会失败,并出现上述错误。我该如何解决?