Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InlineChunkHtmlPlugin Cannot read property 'endsWith' of undefined #6113

Closed
sachinmani opened this issue Jan 2, 2019 · 2 comments
Closed

Comments

@sachinmani
Copy link

sachinmani commented Jan 2, 2019

Is this a bug report?

YES

Did you try recovering your dependencies?

YES

(Write your answer here.)

Which terms did you search for in User Guide?

InlineChunkHtmlPlugin
publicPath

Environment

Environment:
OS: Windows 8.1
Node: 10.3.0
Yarn: 1.6.0
npm: 6.5.0
Watchman: Not Found
Xcode: N/A
Android Studio: Not Found

Packages: (wanted => installed)
react: ^16.3.2 => 16.7.0
react-dom: ^16.3.2 => 16.7.0
react-scripts: 2.1.2 => 2.1.2

Steps to Reproduce

(Write your steps here:)
I am using the CRA and used rewire package library for some config override. Moving to the latest version of the CRA when I tried to build the app I am getting the following error..

Creating an optimized production build...
Failed to compile.

Cannot read property 'endsWith' of undefined

info using npm@6.5.0 3 info using node@v10.3.0 4 verbose run-script [ 'prebuild-xemt', 'build-xemt', 'postbuild-xemt' ] 5 info lifecycle onlinereactcomponents@1.2.0~prebuild-xemt: onlinereactcomponents@1.2.0 6 info lifecycle onlinereactcomponents@1.2.0~build-xemt: onlinereactcomponents@1.2.0 7 verbose lifecycle onlinereactcomponents@1.2.0~build-xemt: unsafe-perm in lifecycle true 8 verbose lifecycle onlinereactcomponents@1.2.0~build-xemt: PATH: C:\Users\''\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;D:\git\git\online-react-components1\node_modules\.bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\oracle\product\ODAC1120320_x32;C:\oracle\product\ODAC1120320_x32\bin;C:\oracle\product\ODAC1120320_x64;C:\oracle\product\ODAC1120320_x64\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Users\''\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\ProgramData\chocolatey\bin;C:\Program Files\7-Zip;C:\Program Files\TortoiseSVN\bin;C:\Program Files\7-Zip;C:\Program Files\TortoiseSVN\bin;C:\Program Files\nodejs;C:\Users\''\Downloads\NUnit-2.6.3.zip\NUnit-2.6.3\bin;C:\Program Files\erl8.0\bin;C:\Program Files (x86)\Elixir\bin;C:\Users\''\.mix\escripts;C:\Program Files (x86)\GitExtensions\;C:\Go\bin;C:\Program Files\Git\cmd;C:\Program Files\Amazon\AWSCLI\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\;C:\Program Files\Microsoft SQL Server\140\Tools\Binn\;C:\Program Files\Microsoft SQL Server\140\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\ManagementStudio\;C:\Program Files (x86)\Microsoft SDKs\TypeScript\2.5\;C:\Program Files\nodejs\;C:\Program Files\dotnet\;C:\Program Files\Microsoft VS Code\bin;C:\Java;;C:\zookeeper-3.4.12\bin;C:\opt\sensu\bin;C:\opt\sensu\embedded\bin;C:\Program Files (x86)\PowerShell\6\;C:\Program Files\PowerShell\6\;C:\Users\''\AppData\Local\Yarn\.bin;C:\Users\''\AppData\Local\Programs\Fiddler;C:\Users\''\AppData\Local\atom\bin;C:\Users\''\AppData\Roaming\npm;C:\Users\''\.dotnet\tools 9 verbose lifecycle onlinereactcomponents@1.2.0~build-xemt: CWD: D:\git\git\online-react-components1 10 silly lifecycle onlinereactcomponents@1.2.0~build-xemt: Args: [ '/d /s /c', 10 silly lifecycle 'cross-env BRANDNAME=xemt node node_modules/react-branding-override-scripts/custom-config build-library && cross-env BRANDNAME=xemt node node_modules/react-branding-override-scripts/postBuild.js' ] 11 silly lifecycle onlinereactcomponents@1.2.0~build-xemt: Returned: code: 1 signal: null 12 info lifecycle onlinereactcomponents@1.2.0~build-xemt: Failed to exec build-xemt script 13 verbose stack Error: onlinereactcomponents@1.2.0 build-xemt:cross-env BRANDNAME=xemt node node_modules/react-branding-override-scripts/custom-config build-library && cross-env BRANDNAME=xemt node node_modules/react-branding-override-scripts/postBuild.js13 verbose stack Exit status 1 13 verbose stack at EventEmitter.<anonymous> (C:\Users\''\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\index.js:301:16) 13 verbose stack at EventEmitter.emit (events.js:182:13) 13 verbose stack at ChildProcess.<anonymous> (C:\Users\''\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14) 13 verbose stack at ChildProcess.emit (events.js:182:13) 13 verbose stack at maybeClose (internal/child_process.js:961:16) 13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:248:5) 14 verbose pkgid onlinereactcomponents@1.2.0 15 verbose cwd D:\git\git\online-react-components1 16 verbose Windows_NT 6.3.9600 17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\''\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "run" "build-xemt" 18 verbose node v10.3.0 19 verbose npm v6.5.0 20 error code ELIFECYCLE 21 error errno 1 22 error onlinereactcomponents@1.2.0 build-xemt:cross-env BRANDNAME=xemt node node_modules/react-branding-override-scripts/custom-config build-library && cross-env BRANDNAME=xemt node node_modules/react-branding-override-scripts/postBuild.js 22 error Exit status 1 23 error Failed at the onlinereactcomponents@1.2.0 build-xemt script. 23 error This is probably not a problem with npm. There is likely additional logging output above. 24 verbose exit [ 1, true ]

Expected Behavior

Build function should work as normal

Actual Behavior

Build function is broken. When debugged, found that publicPath in compiler options is undefined

(Write what happened. Please add screenshots!)

Reproducible Demo

(Paste the link to an example project and exact instructions to reproduce the issue.)

@heyimalex
Copy link
Contributor

This is an issue with react-app-rewired, not create-react-app. Looking at that repo it seems like 2.0+ isn't supported.

@ianschmitz
Copy link
Contributor

Indeed we aren't able to help when using overrides such as react-app-rewired.

@lock lock bot locked and limited conversation to collaborators Jan 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants