generator-jhipster: Webpack fails to build when having the ! String in the path
Overview of the issue
Error when creating a new project.
The error occurs if I run yo jhipster from directory d:\!Test (with !) then the application does not work.
Successful launch if I run yo jhipster from directory d:\Test (without symbol !) then the application is successfully functioning.
Errors:
[./..!./Test/src/main/webapp/manifest.webapp] ./src/main/webapp/manifest.webapp 2.86 kB {2} [built] [failed] [1 error]
[] -> factory:969ms building:451ms = 1420ms
+ 627 hidden modules
ERROR in Error: Child compilation failed:
Entry module not found: Error: Can't resolve 'Test\Test\src\main\webapp\index.html' in 'd:\!Test':
Error: Can't resolve 'Test\Test\src\main\webapp\index.html' in 'd:\!Test'
- compiler.js:76
[!Test]/[html-webpack-plugin]/lib/compiler.js:76:16
- Compiler.js:304 compile
[!Test]/[webpack]/lib/Compiler.js:304:11
- Compiler.js:520 applyPluginsAsync.err
[!Test]/[webpack]/lib/Compiler.js:520:14
- Tapable.js:202 next
[!Test]/[tapable]/lib/Tapable.js:202:11
- CachePlugin.js:62 Compiler.<anonymous>
[!Test]/[webpack]/lib/CachePlugin.js:62:5
- Tapable.js:206 Compiler.applyPluginsAsyncSeries
[!Test]/[tapable]/lib/Tapable.js:206:13
- Compiler.js:517 compilation.seal.err
[!Test]/[webpack]/lib/Compiler.js:517:11
- Tapable.js:195 Compilation.applyPluginsAsyncSeries
[!Test]/[tapable]/lib/Tapable.js:195:46
- Compilation.js:654 self.applyPluginsAsync.err
[!Test]/[webpack]/lib/Compilation.js:654:19
- Tapable.js:195 Compilation.applyPluginsAsyncSeries
[!Test]/[tapable]/lib/Tapable.js:195:46
- Compilation.js:645 self.applyPluginsAsync.err
[!Test]/[webpack]/lib/Compilation.js:645:11
- Tapable.js:195 Compilation.applyPluginsAsyncSeries
[!Test]/[tapable]/lib/Tapable.js:195:46
- Compilation.js:640 self.applyPluginsAsync.err
[!Test]/[webpack]/lib/Compilation.js:640:10
- Tapable.js:195 Compilation.applyPluginsAsyncSeries
[!Test]/[tapable]/lib/Tapable.js:195:46
- Compilation.js:636 sealPart2
[!Test]/[webpack]/lib/Compilation.js:636:9
- Tapable.js:195 Compilation.applyPluginsAsyncSeries
[!Test]/[tapable]/lib/Tapable.js:195:46
- Compilation.js:579 Compilation.seal
[!Test]/[webpack]/lib/Compilation.js:579:8
- Compiler.js:514 applyPluginsParallel.err
[!Test]/[webpack]/lib/Compiler.js:514:17
- Tapable.js:289
[!Test]/[tapable]/lib/Tapable.js:289:11
- Compilation.js:481 _addModuleChain
[!Test]/[webpack]/lib/Compilation.js:481:11
- Compilation.js:370 Compilation.errorAndCallback
[!Test]/[webpack]/lib/Compilation.js:370:4
- Compilation.js:391 moduleFactory.create
[!Test]/[webpack]/lib/Compilation.js:391:12
- NormalModuleFactory.js:247 factory
[!Test]/[webpack]/lib/NormalModuleFactory.js:247:20
- NormalModuleFactory.js:65 resolver
[!Test]/[webpack]/lib/NormalModuleFactory.js:65:21
- NormalModuleFactory.js:138 asyncLib.parallel.e
[!Test]/[webpack]/lib/NormalModuleFactory.js:138:21
- async.js:3861
[!Test]/[webpack]/[async]/dist/async.js:3861:9
- async.js:421
[!Test]/[webpack]/[async]/dist/async.js:421:16
- async.js:996 iteratorCallback
[!Test]/[webpack]/[async]/dist/async.js:996:13
- async.js:906
[!Test]/[webpack]/[async]/dist/async.js:906:16
- async.js:3858
[!Test]/[webpack]/[async]/dist/async.js:3858:13
ERROR in ./src/main/webapp/content/css/global.css
Module not found: Error: Can't resolve '../../../../../..' in 'd:\!Test\src\main\webapp\content\css'
@ ./src/main/webapp/content/css/global.css 4:14-144
ERROR in ./src/main/webapp/content/css/global.css
Module not found: Error: Can't resolve '../../../../../..' in 'd:\!Test\src\main\webapp\content\css'
@ ./src/main/webapp/content/css/global.css 12:13-90
ERROR in ./src/main/webapp/app/blocks/config/prod.config.ts
Module not found: Error: Can't resolve 'd:\' in 'd:\!Test'
@ ./src/main/webapp/app/blocks/config/prod.config.ts 4:22-52
@ ./src/main/webapp/app/app.main.ts
ERROR in ./src/main/webapp/content/css/vendor.css
Module not found: Error: Can't resolve 'Test/node_modules/css-loader/index.js' in 'd:\!Test\src\main\webapp\content\css'
@ ./src/main/webapp/content/css/vendor.css 4:14-144
@ ./src/main/webapp/app/vendor.ts
@ ./src/main/webapp/app/app.module.ts
@ ./src/main/webapp/app/app.main.ts
ERROR in ./src/main/webapp/content/css/vendor.css
Module not found: Error: Can't resolve '../../../../../..' in 'd:\!Test\src\main\webapp\content\css'
@ ./src/main/webapp/content/css/vendor.css 12:13-90
@ ./src/main/webapp/app/vendor.ts
@ ./src/main/webapp/app/app.module.ts
@ ./src/main/webapp/app/app.main.ts
ERROR in ./src/main/webapp/manifest.webapp
Module not found: Error: Can't resolve 'd:\' in 'd:\!Test\src\main\webapp'
@ ./src/main/webapp/manifest.webapp
@ ./src/main/webapp/app/polyfills.ts
ERROR in ./src/main/webapp/manifest.webapp
Module not found: Error: Can't resolve 'd:\' in 'd:\!Test\src\main\webapp'
@ ./src/main/webapp/manifest.webapp
@ ./src/main/webapp/app/polyfills.ts
ERROR in ./src/main/webapp/manifest.webapp
Module not found: Error: Can't resolve 'd:\' in 'd:\!Test\src\main\webapp'
@ ./src/main/webapp/manifest.webapp
@ ./src/main/webapp/app/polyfills.ts
ERROR in ./src/main/webapp/manifest.webapp
Module not found: Error: Can't resolve 'd:\' in 'd:\!Test\src\main\webapp'
@ ./src/main/webapp/manifest.webapp
@ ./src/main/webapp/app/polyfills.ts
ERROR in ./src/main/webapp/manifest.webapp
Module build failed: ModuleNotFoundError: Module not found: Error: Can't resolve 'd:\' in 'd:\!Test\src\main\webapp'
at factoryCallback (d:\!Test\node_modules\webpack\lib\Compilation.js:264:39)
at factory (d:\!Test\node_modules\webpack\lib\NormalModuleFactory.js:247:20)
at resolver (d:\!Test\node_modules\webpack\lib\NormalModuleFactory.js:65:21)
at asyncLib.parallel.e (d:\!Test\node_modules\webpack\lib\NormalModuleFactory.js:138:21)
at d:\!Test\node_modules\webpack\node_modules\async\dist\async.js:3861:9
at d:\!Test\node_modules\webpack\node_modules\async\dist\async.js:421:16
at iteratorCallback (d:\!Test\node_modules\webpack\node_modules\async\dist\async.js:996:13)
at d:\!Test\node_modules\webpack\node_modules\async\dist\async.js:906:16
at d:\!Test\node_modules\webpack\node_modules\async\dist\async.js:3858:13
at d:\!Test\node_modules\webpack\node_modules\async\dist\async.js:1074:9
at d:\!Test\node_modules\webpack\node_modules\async\dist\async.js:421:16
at iteratorCallback (d:\!Test\node_modules\webpack\node_modules\async\dist\async.js:996:13)
at d:\!Test\node_modules\webpack\node_modules\async\dist\async.js:906:16
at d:\!Test\node_modules\webpack\node_modules\async\dist\async.js:1071:13
at resolver.resolve.err2 (d:\!Test\node_modules\webpack\lib\NormalModuleFactory.js:270:7)
at onError (d:\!Test\node_modules\enhanced-resolve\lib\Resolver.js:65:10)
at loggingCallbackWrapper (d:\!Test\node_modules\enhanced-resolve\lib\createInnerCallback.js:31:19)
at runAfter (d:\!Test\node_modules\enhanced-resolve\lib\Resolver.js:158:4)
at innerCallback (d:\!Test\node_modules\enhanced-resolve\lib\Resolver.js:146:3)
at loggingCallbackWrapper (d:\!Test\node_modules\enhanced-resolve\lib\createInnerCallback.js:31:19)
at next (d:\!Test\node_modules\tapable\lib\Tapable.js:252:11)
at d:\!Test\node_modules\enhanced-resolve\lib\UnsafeCachePlugin.js:40:4
at loggingCallbackWrapper (d:\!Test\node_modules\enhanced-resolve\lib\createInnerCallback.js:31:19)
at runAfter (d:\!Test\node_modules\enhanced-resolve\lib\Resolver.js:158:4)
at innerCallback (d:\!Test\node_modules\enhanced-resolve\lib\Resolver.js:146:3)
at loggingCallbackWrapper (d:\!Test\node_modules\enhanced-resolve\lib\createInnerCallback.js:31:19)
at next (d:\!Test\node_modules\tapable\lib\Tapable.js:252:11)
at innerCallback (d:\!Test\node_modules\enhanced-resolve\lib\Resolver.js:144:11)
at loggingCallbackWrapper (d:\!Test\node_modules\enhanced-resolve\lib\createInnerCallback.js:31:19)
at next (d:\!Test\node_modules\tapable\lib\Tapable.js:249:35)
@ ./src/main/webapp/app/polyfills.ts 6:0-29
ERROR in ./src/main/webapp/app/layouts/navbar/navbar.component.ts
Module not found: Error: Can't resolve 'd:\' in 'd:\!Test'
@ ./src/main/webapp/app/layouts/navbar/navbar.component.ts 17:22-52
@ ./src/main/webapp/app/layouts/index.ts
@ ./src/main/webapp/app/app.module.ts
@ ./src/main/webapp/app/app.main.ts
ERROR in ./src/main/webapp/app/home/home.css
Module not found: Error: Can't resolve 'Test/node_modules/css-loader/index.js' in 'd:\!Test\src\main\webapp\app\home'
@ ./src/main/webapp/app/home/home.css 2:21-146
@ ./src/main/webapp/app/home/home.component.ts
@ ./src/main/webapp/app/home/index.ts
@ ./src/main/webapp/app/home/home.module.ts
@ ./src/main/webapp/app/app.module.ts
@ ./src/main/webapp/app/app.main.ts
ERROR in ./src/main/webapp/app/layouts/navbar/navbar.css
Module not found: Error: Can't resolve 'Test/node_modules/css-loader/index.js' in 'd:\!Test\src\main\webapp\app\layouts\navbar'
@ ./src/main/webapp/app/layouts/navbar/navbar.css 2:21-164
@ ./src/main/webapp/app/layouts/navbar/navbar.component.ts
@ ./src/main/webapp/app/layouts/index.ts
@ ./src/main/webapp/app/app.module.ts
@ ./src/main/webapp/app/app.main.ts
ERROR in ./src/main/webapp/app/layouts/profiles/page-ribbon.css
Module not found: Error: Can't resolve 'Test/node_modules/css-loader/index.js' in 'd:\!Test\src\main\webapp\app\layouts\profiles'
@ ./src/main/webapp/app/layouts/profiles/page-ribbon.css 2:21-171
@ ./src/main/webapp/app/layouts/profiles/page-ribbon.component.ts
@ ./src/main/webapp/app/layouts/index.ts
@ ./src/main/webapp/app/app.module.ts
@ ./src/main/webapp/app/app.main.ts
ERROR in ./src/main/webapp/app/account/password/password-strength-bar.css
Module not found: Error: Can't resolve 'Test/node_modules/css-loader/index.js' in 'd:\!Test\src\main\webapp\app\account\password'
@ ./src/main/webapp/app/account/password/password-strength-bar.css 2:21-181
@ ./src/main/webapp/app/account/password/password-strength-bar.component.ts
@ ./src/main/webapp/app/account/index.ts
@ ./src/main/webapp/app/account/account.module.ts
@ ./src/main/webapp/app/app.module.ts
@ ./src/main/webapp/app/app.main.ts
error Command failed with exit code 2.
error Command failed with exit code 1.
error Command failed with exit code 1.
Motivation for or Use Case
Reproduce the error
Run cmd.exe
d:
mkdir !Test
cd !Test
copy d:\PATH_TO_MY_CONFIGURATION\.yo-rc.json .yo-rc.json
yo jhipster
// here we will get an error.
Related issues
The directory name affects the build.
JHipster Version(s)
v4.6.2
Package Version(s)
npm -v 5.3.0
node -v v6.11.2
JHipster configuration
.yo-rc.json file:
{
"generator-jhipster": {
"promptValues": {
"packageName": "com.example.app",
"nativeLanguage": "ru"
},
"jhipsterVersion": "4.6.2",
"baseName": "MyApp",
"packageName": "com.example.app",
"packageFolder": "com/example/app",
"serverPort": "8080",
"authenticationType": "jwt",
"hibernateCache": "ehcache",
"clusteredHttpSession": false,
"websocket": false,
"databaseType": "sql",
"devDatabaseType": "h2Memory",
"prodDatabaseType": "mysql",
"searchEngine": false,
"messageBroker": false,
"serviceDiscoveryType": false,
"buildTool": "maven",
"enableSocialSignIn": false,
"jwtSecretKey": "3707529474a2aa8ee00ccad0606e6a4cb1528e2e",
"clientFramework": "angularX",
"useSass": false,
"clientPackageManager": "yarn",
"applicationType": "monolith",
"testFrameworks": [],
"jhiPrefix": "jhi",
"otherModules": [
{
"name": "generator-jhipster-bootstrap-material-design",
"version": "3.5.1"
},
{
"name": "generator-jhipster-google-maps",
"version": "0.0.1"
}
],
"enableTranslation": true,
"nativeLanguage": "ru",
"languages": [
"ru"
]
}
}
Browsers and Operating System
Windows 10.0.15063 x64 File System: NTFS
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 15 (7 by maintainers)
@gmarziou I did nothing against law. I use for appear first in directory listing by name.
Allowed characters in file or directory names for file systems NTFS: any UTF-16 code unit (case-insensitive) except
/\:*"?<>|as well asNUL. ext4: All bytes exceptNULand/and the special file names.and..which are not forbidden but are always used for a respective special purpose.@delverde I verified
generator-jhipster@3.5.0It’s perfect to work! Alsogenerator-jhipster@4.6.2It’s perfect to work if you choose:? (12/16) Which *Framework* would you like to use for the client?AngularJS 1.x. The problem is only if you choose Angular 4.