Can not replicate easy build - Module not found: Error: Can't resolve './app.ts'
Gedminas opened this issue · 3 comments
I'm not denying that there may be something wrong with my configuration. Any guidance is greatly appreciated.
ng build >> log.txt
./node_modules/.bin/ng-render --version >> log.txt
./node_modules/.bin/ng-render &>> log.txt
output:
Date: 2017-08-11T20:40:05.840Z
Hash: 4b49caa4c39548432803
Time: 40349ms
chunk {guides.module} guides.module.chunk.js, guides.module.chunk.js.map () 86.1 kB {main} [rendered]
chunk {inline} inline.bundle.js, inline.bundle.js.map (inline) 5.83 kB [entry] [rendered]
chunk {main} main.bundle.js, main.bundle.js.map (main) 855 kB {vendor} [initial] [rendered]
chunk {polyfills} polyfills.bundle.js, polyfills.bundle.js.map (polyfills) 318 kB {inline} [initial] [rendered]
chunk {scripts} scripts.bundle.js, scripts.bundle.js.map (scripts) 634 kB {inline} [initial] [rendered]
chunk {styles} styles.bundle.js, styles.bundle.js.map (styles) 468 kB {inline} [initial] [rendered]
chunk {vendor} vendor.bundle.js, vendor.bundle.js.map (vendor) 5.88 MB [initial] [rendered]
0.10.38
[2017-08-11T20:41:12.471Z] [info] [] Rendering application from source (working path: /tmp/54963834bc6b9)
Unhandled Promise rejection: Hash: 4b17a98eb7ee7f917c25
Version: webpack 3.4.1
Time: 5040ms
Asset Size Chunks Chunk Names
0.js 595 bytes 0 app
0.js.map 5.91 kB 0 app
[0] multi ./app.ts 28 bytes {0} [built]
ERROR in multi ./app.ts
Module not found: Error: Can't resolve './app.ts' in '/media/user/local_disk/PROJECTS/xxxxxx-ng4/src'
@ multi ./app.ts ; Zone: <root> ; Task: Promise.then ; Value: { Error: Hash: 4b17a98eb7ee7f917c25
Version: webpack 3.4.1
Time: 5040ms
Asset Size Chunks Chunk Names
0.js 595 bytes 0 app
0.js.map 5.91 kB 0 app
[0] multi ./app.ts 28 bytes {0} [built]
ERROR in multi ./app.ts
Module not found: Error: Can't resolve './app.ts' in '/media/user/local_disk/PROJECTS/xxxxxx-ng4/src'
@ multi ./app.ts
at CompilerException.Exception [as constructor] (/media/user/local_disk/PROJECTS/xxxxxx-ng4/node_modules/angular-ssr/source/exception.ts:6:5)
at new CompilerException (/media/user/local_disk/PROJECTS/xxxxxx-ng4/node_modules/angular-ssr/build/exception.js:63:42)
at /media/user/local_disk/PROJECTS/xxxxxx-ng4/node_modules/angular-ssr/source/application/compiler/webpack/compiler.ts:103:18
at onCompiled (/media/user/local_disk/PROJECTS/xxxxxx-ng4/node_modules/webpack/lib/Compiler.js:241:12)
at applyPluginsAsync.err (/media/user/local_disk/PROJECTS/xxxxxx-ng4/node_modules/webpack/lib/Compiler.js:520:14)
at next (/media/user/local_disk/PROJECTS/xxxxxx-ng4/node_modules/tapable/lib/Tapable.js:202:11)
at Compiler.<anonymous> (/media/user/local_disk/PROJECTS/xxxxxx-ng4/node_modules/webpack/lib/CachePlugin.js:62:5)
at Compiler.applyPluginsAsyncSeries (/media/user/local_disk/PROJECTS/xxxxxx-ng4/node_modules/tapable/lib/Tapable.js:206:13)
at compilation.seal.err (/media/user/local_disk/PROJECTS/xxxxxx-ng4/node_modules/webpack/lib/Compiler.js:517:11)
at next (/media/user/local_disk/PROJECTS/xxxxxx-ng4/node_modules/tapable/lib/Tapable.js:202:11)
at Compilation.compilation.plugin (/media/user/local_disk/PROJECTS/xxxxxx-ng4/node_modules/@angular/cli/plugins/suppress-entry-chunks-webpack-plugin.js:35:17)
at Compilation.applyPluginsAsyncSeries (/media/user/local_disk/PROJECTS/xxxxxx-ng4/node_modules/tapable/lib/Tapable.js:206:13)
at self.applyPluginsAsync.err (/media/user/local_disk/PROJECTS/xxxxxx-ng4/node_modules/webpack/lib/Compilation.js:654:19)
at Compilation.applyPluginsAsyncSeries (/media/user/local_disk/PROJECTS/xxxxxx-ng4/node_modules/tapable/lib/Tapable.js:195:46)
at self.applyPluginsAsync.err (/media/user/local_disk/PROJECTS/xxxxxx-ng4/node_modules/webpack/lib/Compilation.js:645:11)
at next (/media/user/local_disk/PROJECTS/xxxxxx-ng4/node_modules/tapable/lib/Tapable.js:202:11)
innerException: undefined,
__zone_symbol__currentTask:
ZoneTask {
_zone:
Zone {
_properties: {},
_parent: null,
_name: '<root>',
_zoneDelegate: [Object] },
runCount: 0,
_zoneDelegates: null,
_state: 'notScheduled',
type: 'microTask',
source: 'Promise.then',
data: undefined,
scheduleFn: undefined,
cancelFn: null,
callback: [Function],
invoke: [Function] } } Error: Hash: 4b17a98eb7ee7f917c25
Version: webpack 3.4.1
Time: 5040ms
Asset Size Chunks Chunk Names
0.js 595 bytes 0 app
0.js.map 5.91 kB 0 app
[0] multi ./app.ts 28 bytes {0} [built]
ERROR in multi ./app.ts
Module not found: Error: Can't resolve './app.ts' in '/media/user/local_disk/PROJECTS/xxxxxx-ng4/src'
@ multi ./app.ts
at CompilerException.Exception [as constructor] (/media/user/local_disk/PROJECTS/xxxxxx-ng4/node_modules/angular-ssr/source/exception.ts:6:5)
at new CompilerException (/media/user/local_disk/PROJECTS/xxxxxx-ng4/node_modules/angular-ssr/build/exception.js:63:42)
at /media/user/local_disk/PROJECTS/xxxxxx-ng4/node_modules/angular-ssr/source/application/compiler/webpack/compiler.ts:103:18
at onCompiled (/media/user/local_disk/PROJECTS/xxxxxx-ng4/node_modules/webpack/lib/Compiler.js:241:12)
at applyPluginsAsync.err (/media/user/local_disk/PROJECTS/xxxxxx-ng4/node_modules/webpack/lib/Compiler.js:520:14)
at next (/media/user/local_disk/PROJECTS/xxxxxx-ng4/node_modules/tapable/lib/Tapable.js:202:11)
at Compiler.<anonymous> (/media/user/local_disk/PROJECTS/xxxxxx-ng4/node_modules/webpack/lib/CachePlugin.js:62:5)
at Compiler.applyPluginsAsyncSeries (/media/user/local_disk/PROJECTS/xxxxxx-ng4/node_modules/tapable/lib/Tapable.js:206:13)
at compilation.seal.err (/media/user/local_disk/PROJECTS/xxxxxx-ng4/node_modules/webpack/lib/Compiler.js:517:11)
at next (/media/user/local_disk/PROJECTS/xxxxxx-ng4/node_modules/tapable/lib/Tapable.js:202:11)
at Compilation.compilation.plugin (/media/user/local_disk/PROJECTS/xxxxxx-ng4/node_modules/@angular/cli/plugins/suppress-entry-chunks-webpack-plugin.js:35:17)
at Compilation.applyPluginsAsyncSeries (/media/user/local_disk/PROJECTS/xxxxxx-ng4/node_modules/tapable/lib/Tapable.js:206:13)
at self.applyPluginsAsync.err (/media/user/local_disk/PROJECTS/xxxxxx-ng4/node_modules/webpack/lib/Compilation.js:654:19)
at Compilation.applyPluginsAsyncSeries (/media/user/local_disk/PROJECTS/xxxxxx-ng4/node_modules/tapable/lib/Tapable.js:195:46)
at self.applyPluginsAsync.err (/media/user/local_disk/PROJECTS/xxxxxx-ng4/node_modules/webpack/lib/Compilation.js:645:11)
at next (/media/user/local_disk/PROJECTS/xxxxxx-ng4/node_modules/tapable/lib/Tapable.js:202:11)
versions
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
@angular/cli: 1.3.0
node: 8.2.1
os: linux x64
@angular/animations: 4.3.4
@angular/cdk: 2.0.0-beta.8
@angular/common: 4.3.4
@angular/compiler: 4.3.4
@angular/compiler-cli: 4.3.4
@angular/core: 4.3.4
@angular/forms: 4.3.4
@angular/http: 4.3.4
@angular/material: 2.0.0-beta.8
@angular/platform-browser: 4.3.4
@angular/platform-browser-dynamic: 4.3.4
@angular/platform-server: 4.3.4
@angular/router: 4.3.4
@angular/cli: 1.3.0
TL;DR
using standard ng-cli build ended up with Module not found: Error: Can't resolve './app.ts' in '/media/user/local_disk/PROJECTS/xxxxxx-ng4/src'
quick glance at example cli project didn't find clues
@clbond thanks, If you need any more input or additional configs/testing let me know.
HI @Gedminas. I am able to use the latest ng cli to generate a new project and I can run ng-render
on it successfully. Log pasted below. If you are still having this issue can you point me to your code repository so I can use that to reproduce the issue. Because as it stands right now I can't reproduce it.
muscle:ngtest2 bond$ npm run build
> ngtest2@0.0.0 build /Users/bond/ngtest2
> ng build
Date: 2017-08-13T09:19:38.490Z
Hash: 9d37566d6247cfb64cde
Time: 5914ms
chunk {inline} inline.bundle.js, inline.bundle.js.map (inline) 5.83 kB [entry] [rendered]
chunk {main} main.bundle.js, main.bundle.js.map (main) 8.33 kB {vendor} [initial] [rendered]
chunk {polyfills} polyfills.bundle.js, polyfills.bundle.js.map (polyfills) 204 kB {inline} [initial] [rendered]
chunk {styles} styles.bundle.js, styles.bundle.js.map (styles) 11.3 kB {inline} [initial] [rendered]
chunk {vendor} vendor.bundle.js, vendor.bundle.js.map (vendor) 1.94 MB [initial] [rendered]
> ngtest2@0.0.0 postbuild /Users/bond/ngtest2
> ng-render
[info] Rendering application from source (working path: /var/folders/h4/vmsq15y54dl5170g0cncvv8r0000gn/T/699adce1de9da)
Angular is running in the development mode. Call enableProdMode() to enable the production mode.
Angular is running in the development mode. Call enableProdMode() to enable the production mode.
[info] Rendered route / to /Users/bond/ngtest2/dist/index.html