Skip to content
This repository has been archived by the owner on Mar 20, 2024. It is now read-only.

ng serve & ng e2e fails when using preboot with angular CLI #52

Closed
2 of 8 tasks
hamedbaatour opened this issue Nov 6, 2017 · 8 comments
Closed
2 of 8 tasks

ng serve & ng e2e fails when using preboot with angular CLI #52

hamedbaatour opened this issue Nov 6, 2017 · 8 comments
Milestone

Comments

@hamedbaatour
Copy link

hamedbaatour commented Nov 6, 2017

  • I'm submitting a ...
  • bug report
  • feature request
  • Which parts of preboot are affected by this issue?
  • server side
  • client side
  • inline
  • build process
  • docs
  • tests
  • Do you want to request a feature or report a bug?
    Bug

  • What is the current behavior?
    ng serve and ng e2e are failing with the following error log in the console:

C:\Users\PrebootPC\Desktop\Projects\Preboot\Preboot>ng e2e
** NG Live Development Server is listening on localhost:49152, open your browser on http://localhost:49152/ **
Date: 2017-11-06T10:04:48.102Z
Hash: 3d6f41a2627365d2252f
Time: 11686ms
chunk {auth.module} test.module.chunk.js, auth.module.chunk.js.map () 148 kB  [rendered]
chunk {email.module} auth.module.chunk.js, email.module.chunk.js.map () 3.61 kB  [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) 82.5 kB [initial] [rendered]
chunk {polyfills} polyfills.bundle.js, polyfills.bundle.js.map (polyfills) 217 kB [initial] [rendered]
chunk {settings.module} settings.module.chunk.js, settings.module.chunk.js.map () 6.87 kB  [rendered]
chunk {storage.module} welcome.module.chunk.js, welcome2.module.chunk.js.map () 3.66 kB  [rendered]
chunk {styles} styles.bundle.js, styles.bundle.js.map (styles) 77.1 kB [initial] [rendered]
chunk {tasks.module} home.module.chunk.js, core.module.chunk.js.map () 51.7 kB  [rendered]
chunk {updates.module} test2.module.chunk.js, updates.module.chunk.js.map () 3.66 kB  [rendered]
chunk {vendor} vendor.bundle.js, vendor.bundle.js.map (vendor) 7.39 MB [initial] [rendered]

ERROR in ./node_modules/preboot/src/browser/browser-preboot.module.ts
Module build failed: Error: C:\Users\PrebootPC\Desktop\Projects\Preboot\Preboot\node_modules\preboot\src\browser\browser-preboot.module.ts is not part of the compilation output. Please check the other error messages for details.
    at AngularCompilerPlugin.getCompiledFile (C:\Users\PrebootPC\Desktop\Projects\Preboot\Preboot\node_modules\@ngtools\webpack\src\angular_compiler_plugin.js:629:23)
    at plugin.done.then (C:\Users\PrebootPC\Desktop\Projects\Raya\raya\node_modules\@ngtools\webpack\src\loader.js:467:39)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)
 @ ./src/app/app.module.ts 15:0-82
 @ ./src/main.ts
 @ multi webpack-dev-server/client?http://0.0.0.0:0 ./src/main.ts

webpack: Failed to compile.
Build did not succeed. Please fix errors before running e2e task
  • If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem by creating a github repo.

  • What is the expected behavior?
    app should serve with ng serve
    e2e tests should pass.

  • Please tell us about your environment:

  • Browser: [Chrome 63]
  • Language: [TypeScript 2.6.1]
  • OS: [Windows]
  • Platform: [NodeJs]

image

  • Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, gitter, etc)

ng build --prod & ng test do not emit the error described.

@hamedbaatour hamedbaatour changed the title e2e tests fails when using preboot with angular cli ng serve & ng e2e fails when using preboot with angular cli Nov 6, 2017
@hamedbaatour hamedbaatour changed the title ng serve & ng e2e fails when using preboot with angular cli ng serve & ng e2e fails when using preboot with angular CLI Nov 6, 2017
@hamedbaatour
Copy link
Author

a current workaround I'm using now to continue the development is to serve the app in AOT mode using: ng serve --aot

@CaerusKaru
Copy link
Member

Can you please include the preboot version you’re using? Also this should be fixed by #51, tracked by #49

@hamedbaatour
Copy link
Author

@CaerusKaru using the latest preboot version 5.1.7^

@madebyivan
Copy link

madebyivan commented Nov 15, 2017

It happens to me... preboot version 5.1.7^

screen shot 2017-11-15 at 12 25 45 pm

Help! please!

@madebyivan
Copy link

tsconfig.app.json:

{
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/app",
"baseUrl": "./",
"module": "es2015",
"types": [
"node"
]
},
"exclude": [
"test.ts",
"**/*.spec.ts"
]
}

tsconfig.server.json:
{
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/app",
"baseUrl": "./",
// Set the module format to "commonjs":
"module": "commonjs",
"types": [
"node"
]
},
"exclude": [
"test.ts",
"**/*.spec.ts"
],
// Add "angularCompilerOptions" with the AppServerModule you wrote
// set as the "entryModule".
"angularCompilerOptions": {
"entryModule": "app/app.server.module#AppServerModule"
}
}

@naveedahmed1
Copy link

Any update on this?

@CaerusKaru
Copy link
Member

@naveedahmed1 We're currently validating the new build format in #51. Most issues have been resolved and we should be able to push a new version out this week or early next week. Stay tuned.

@naveedahmed1
Copy link

Sounds good :)

@CaerusKaru CaerusKaru added this to the 6.0.0 milestone Feb 13, 2018
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

4 participants