11

I am using react build and trying to import some files from a folder outside of the create-react-app directory. It doesn't allow me to do that so I try to make a symlink of the folder inside of the directory. Then I got errors from react-dev-utils/ModuleScopePlugin.js, it seems that react is not very happy about symlinks? Everything works fine when I replace the symlink folder with the actual folder.

Creating an optimized production build...
..../src/frontend/project-editor/node_modules/react-dev-utils/ModuleScopePlugin.js:31
          request.descriptionFileRoot.indexOf('/node_modules/') !== -1 ||
                                      ^

TypeError: Cannot read property 'indexOf' of undefined
Philipp Kyeck
  • 18,402
  • 15
  • 86
  • 123
Natalia
  • 153
  • 1
  • 8

1 Answers1

0

Looks like you used react-app-rewired package to import the files outside of the src directory. This issue implies that you included wrong path imports anywhere.

To trace the issue, please run yarn build. It will show you a tip where you included the wrong imports.