Giter Site home page Giter Site logo

Comments (6)

SamuelThomas78 avatar SamuelThomas78 commented on May 18, 2024

Hi,
I have same problem did you find a solution ?

from angular-webpack-starter.

tonihuang avatar tonihuang commented on May 18, 2024

Hi Samuel,

I ended up performing yarn install on server to have the package installed on server.

from angular-webpack-starter.

nagarajukmenlo avatar nagarajukmenlo commented on May 18, 2024

Hi,
When we run node dist/server.js I am getting following error:

Error: Invalid provider for undefined. useClass cannot be undefined.
Usually it happens when:
1. There's a circular dependency (might be caused by using index.ts (barrel) files).
2. Class was used before it was declared. Use forwardRef in this case.
at syntaxError (C:\Users\nagaraajuk\Desktop\New folder\dist\node_modules@angular\compiler\bundles\compiler.umd.js:287:21)

Node Version: 9.11.0
Webpack version: 4.0.0
NPM version: 5.6.0

Please help us to resolve the above issue.

Thanks.

from angular-webpack-starter.

nagarajukmenlo avatar nagarajukmenlo commented on May 18, 2024

Hi All,

I got a fix for the above-mentioned issue.

I have added below lines in webpak.config.ts

"module": {
"rules": [
{
"enforce": "pre",
"test": /.js$/,
"loader": "source-map-loader",
"exclude": [
// instead of //node_modules//
path.join(process.cwd(), 'node_modules')
]
},

from angular-webpack-starter.

abelokon0711 avatar abelokon0711 commented on May 18, 2024

@nagarajukmenlo unfortunately your solution did not help. we get still the same error

from angular-webpack-starter.

ohabash avatar ohabash commented on May 18, 2024

I have the same problem. The problem started when i was trying to fix another problem . My universal app kept failing during build but doing the following in webpack.server.config.js allowed the app to build. But cause the same problem you guys described above.

const nodeExternals = require('webpack-node-externals');

module.exports = {
...
   externals: [nodeExternals()],
...
}

Did you guys find a solution? are you still working on it?

from angular-webpack-starter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.