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

Setup Error #23

Open
KrGyan opened this issue Jun 2, 2017 · 2 comments
Open

Setup Error #23

KrGyan opened this issue Jun 2, 2017 · 2 comments

Comments

@KrGyan
Copy link

KrGyan commented Jun 2, 2017

Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.

  • configuration.output.path: The provided value "dist" is not an absolute path!

Steps:

  1. cloned the repo.
  2. npm install (to install all dependencies)
  3. npm start - (Error got on this step)
@Orvisky
Copy link

Orvisky commented Jun 2, 2017

Hi,

solution for this error actually is:

const ngtools = require('@ngtools/webpack');
const path = require('path');

module.exports = {
	entry: {
		main: './src/main.server.ts'
	},
	resolve: {
      extensions: ['.ts', '.js']
    },
	target: 'node',
	output: {
		path: path.resolve(__dirname, 'dist'),
		filename: '[name].js'
	},
	plugins: [
		new ngtools.AotPlugin({
			tsConfigPath: './tsconfig.json'
		})
	],
	module: {
		rules: [
			{
              test: /\.ts$/,
              loader: '@ngtools/webpack'
            }
		]
	}
}

But unfortunately, after i fixed this, another errors occured:

ERROR in Error encountered resolving symbol values statically. Could not resolve @angular/animations/browser relative to /Users/****/angular-universal-test/node_modules/@angular/platform-browser/animations/index.d.ts., resolving symbol ɵf in /Users/****/angular-universal-test/node_modules/@angular/platform-browser/animations/index.d.ts, resolving symbol BrowserAnimationsModule in /Users/****/angular-universal-test/node_modules/@angular/platform-browser/animations/index.d.ts, resolving symbol BrowserAnimationsModule in /Users/****/angular-universal-test/node_modules/@angular/platform-browser/animations/index.d.ts

ERROR in /Users/****/angular-universal-test/src/main.server.ts (5,42): Cannot find module './ngfactory/src/app.server.ngfactory'.

ERROR in ./src/main.server.ts
Module not found: Error: Can't resolve './ngfactory/src/app.server.ngfactory' in '/Users/****/angular-universal-test/src'
 @ ./src/main.server.ts 3:0-80

ERROR in ./~/@angular/platform-server/@angular/platform-server.es5.js
Module not found: Error: Can't resolve '@angular/animations/browser' in '/Users/****/angular-universal-test/node_modules/@angular/platform-server/@angular'
 @ ./~/@angular/platform-server/@angular/platform-server.es5.js 9:0-63
 @ ./src/express-engine.ts
 @ ./src/main.server.ts

ERROR in ./~/@angular/platform-browser/@angular/platform-browser/animations.es5.js
Module not found: Error: Can't resolve '@angular/animations/browser' in '/Users/****/angular-universal-test/node_modules/@angular/platform-browser/@angular/platform-browser'
 @ ./~/@angular/platform-browser/@angular/platform-browser/animations.es5.js 10:0-206
 @ ./~/@angular/platform-server/@angular/platform-server.es5.js
 @ ./src/express-engine.ts
 @ ./src/main.server.ts

ERROR in ./~/@angular/platform-browser/@angular/platform-browser/animations.es5.js
Module not found: Error: Can't resolve '@angular/animations' in '/Users/****/angular-universal-test/node_modules/@angular/platform-browser/@angular/platform-browser'
 @ ./~/@angular/platform-browser/@angular/platform-browser/animations.es5.js 9:0-83
 @ ./~/@angular/platform-server/@angular/platform-server.es5.js
 @ ./src/express-engine.ts
 @ ./src/main.server.ts

I am running:

macOS Sierra, 10.12.5 (16F73)
npm 3.10.10
node v6.9.5

@ysazak
Copy link

ysazak commented Jun 17, 2017

Exactly same problem here as well

Windows 8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants