angular / components

Component infrastructure and Material Design components for Angular
https://material.angular.io
MIT License
24.22k stars 6.69k forks source link

Cannot read property 'config' of null #9325

Closed briankitt closed 6 years ago

briankitt commented 6 years ago

Bug, feature request, or proposal:

Bug

What is the expected behavior?

I expected this repository to actually work

What is the current behavior?

I get the error 'Cannot read property 'config' of null'

What are the steps to reproduce?

I cloned the repository on Windows 10 Pro.
Per 'Readme.md' I then run 'npm install -g gulp' Per 'Readme.md' I then run 'npm install' I then run 'ng serve'. I get the error 'Unable to find "@angular/cli" in devDependencies.' So per recommendation, I run 'npm install --save-dev @angular/cli@latest' I get the error '@angular/compiler-cli@5.1.1 requires typescript@'>=2.4.2 <2.5.0' but 2.5.3 was found instead.' So per recommendation, I run 'npm install typescript@2.4.2' I then run 'ng serve' again. Same issue. I get so many warnings about incompatible source, that I suspect I am missing something big picture. What am I missing?

What is the use-case or motivation for changing an existing behavior?

I am trying to simply run the demo of this project

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

I am running current versions.

Is there anything else we should know?

Here is my CLI log.

c:\Users\P_1016\Source\Angular\material2-master>npm version { 'material2-srcs': '5.0.4', npm: '5.5.1', ares: '1.13.0', cldr: '31.0.1', http_parser: '2.7.0', icu: '59.1', modules: '59', nghttp2: '1.25.0', node: '9.1.0', openssl: '1.0.2m', tz: '2017b', unicode: '9.0', uv: '1.15.0', v8: '6.2.414.32-node.8', zlib: '1.2.11' }

c:\Users\P_1016\Source\Angular\material2-master>npm install -g gulp npm WARN deprecated gulp-util@3.0.8: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5 npm WARN deprecated graceful-fs@3.0.11: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue npm WARN deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue npm WARN deprecated graceful-fs@1.2.3: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js C:\Users\P_1016\AppData\Roaming\npm\gulp -> C:\Users\P_1016\AppData\Roaming\npm\node_modules\gulp\bin\gulp.js

c:\Users\P_1016\Source\Angular\material2-master>npm install npm WARN registry Unexpected warning for https://registry.npmjs.org/: Miscellaneous Warning EINTEGRITY: sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g== integrity checksum failed when using sha512: wanted sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g== but got sha1-W7WgZyYotkFJVmuhaBnmFRjGcmE=. (17183 bytes) npm WARN registry Using stale package data from https://registry.npmjs.org/ due to a request error during revalidation.

grpc@1.7.1 install c:\Users\P_1016\Source\Angular\material2-master\node_modules\@google-cloud\functions-emulator\node_modules\grpc node-pre-gyp install --fallback-to-build --library=static_library

[grpc] Success: "c:\Users\P_1016\Source\Angular\material2-master\node_modules\@google-cloud\functions-emulator\node_modules\grpc\src\node\extension_binary\node-v59-win32-x64\grpc_node.node" is installed via remote

node-sass@4.7.2 install c:\Users\P_1016\Source\Angular\material2-master\node_modules\node-sass node scripts/install.js

Cached binary found at C:\Users\P_1016\AppData\Roaming\npm-cache\node-sass\4.7.2\win32-x64-59_binding.node

grpc@1.7.1 install c:\Users\P_1016\Source\Angular\material2-master\node_modules\@google-cloud\firestore\node_modules\grpc node-pre-gyp install --fallback-to-build --library=static_library

[grpc] Success: "c:\Users\P_1016\Source\Angular\material2-master\node_modules\@google-cloud\firestore\node_modules\grpc\src\node\extension_binary\node-v59-win32-x64\grpc_node.node" is installed via remote

grpc@1.7.2 install c:\Users\P_1016\Source\Angular\material2-master\node_modules\grpc node-pre-gyp install --fallback-to-build --library=static_library

[grpc] Success: "c:\Users\P_1016\Source\Angular\material2-master\node_modules\grpc\src\node\extension_binary\node-v59-win32-x64-unknown\grpc_node.node" is installed via remote

wd@1.4.1 install c:\Users\P_1016\Source\Angular\material2-master\node_modules\wd node scripts/build-browser-scripts

axe-core@2.5.0 postinstall c:\Users\P_1016\Source\Angular\material2-master\node_modules\axe-core node build/utils/postinstall.js

protobufjs@6.8.3 postinstall c:\Users\P_1016\Source\Angular\material2-master\node_modules\@google-cloud\functions-emulator\node_modules\protobufjs node scripts/postinstall

protobufjs@6.8.3 postinstall c:\Users\P_1016\Source\Angular\material2-master\node_modules\google-gax\node_modules\protobufjs node scripts/postinstall

sauce-connect-launcher@1.2.3 postinstall c:\Users\P_1016\Source\Angular\material2-master\node_modules\sauce-connect-launcher node scripts/install.js || nodejs scripts/install.js

node-sass@4.7.2 postinstall c:\Users\P_1016\Source\Angular\material2-master\node_modules\node-sass node scripts/build.js

Binary found at c:\Users\P_1016\Source\Angular\material2-master\node_modules\node-sass\vendor\win32-x64-59\binding.node Testing binary Binary is fine (node:9376) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 SIGINT listeners added. Use emitter.setMaxListeners() to increase limit

@google-cloud/functions-emulator@1.0.0-alpha.27 postinstall c:\Users\P_1016\Source\Angular\material2-master\node_modules\@google-cloud\functions-emulator node scripts/upgrade-warning

If you're upgrading @google-cloud/functions-emulator, these are the recommended upgrade steps:

  1. Stop the currently running emulator, if any:

    functions stop
  2. Uninstall the current emulator, if any:

    npm uninstall -g @google-cloud/functions-emulator
  3. Install the new version of the emulator:

    npm install -g @google-cloud/functions-emulator

If you have trouble after upgrading, try deleting the config directory found in:

~/.config/configstore/@google-cloud/functions-emulator

Then restart the emulator. You can also check for any renegade Node.js emulator processes that may need to be killed:

ps aux | grep node

material2-srcs@5.0.4 postinstall c:\Users\P_1016\Source\Angular\material2-master ngc -p angular.tsconfig.json

added 2051 packages in 77.211s

c:\Users\P_1016\Source\Angular\material2-master>ng serve Unable to find "@angular/cli" in devDependencies.

Please take the following steps to avoid issues: "npm install --save-dev @angular/cli@latest"

@angular/compiler-cli@5.1.1 requires typescript@'>=2.4.2 <2.5.0' but 2.5.3 was found instead. Using this version can result in undefined behaviour and difficult to debug problems.

Please run the following command to install a compatible version of TypeScript.

npm install typescript@'>=2.4.2 <2.5.0'

To disable this warning run "ng set warnings.typescriptMismatch=false".

Cannot read property 'config' of null TypeError: Cannot read property 'config' of null at Class.run (C:\Users\P_1016\AppData\Roaming\npm\node_modules\@angular\cli\tasks\serve.js:51:63) at check_port_1.checkPort.then.port (C:\Users\P_1016\AppData\Roaming\npm\node_modules\@angular\cli\commands\serve.js:123:26) at at process._tickCallback (internal/process/next_tick.js:188:7)

c:\Users\P_1016\Source\Angular\material2-master>npm install --save-dev @angular/cli@latest npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but npm-shrinkwrap.json was generated for lockfileVersion@0. I'll try to do my best with it!

uglifyjs-webpack-plugin@0.4.6 postinstall c:\Users\P_1016\Source\Angular\material2-master\node_modules\webpack\node_modules\uglifyjs-webpack-plugin node lib/post_install.js

npm WARN @angular/upgrade@5.0.5 requires a peer of @angular/core@5.0.5 but none is installed. You must install peer dependencies yourself. npm WARN @angular/upgrade@5.0.5 requires a peer of @angular/compiler@5.0.5 but none is installed. You must install peer dependencies yourself. npm WARN @angular/upgrade@5.0.5 requires a peer of @angular/platform-browser@5.0.5 but none is installed. You must install peer dependencies yourself. npm WARN @angular/upgrade@5.0.5 requires a peer of @angular/platform-browser-dynamic@5.0.5 but none is installed. You must install peer dependencies yourself. npm WARN tsickle@0.24.1 requires a peer of typescript@2.4.2 but none is installed. You must install peer dependencies yourself. npm WARN typescript-eslint-parser@1.0.2 requires a peer of typescript@~2.0.3 but none is installed. You must install peer dependencies yourself. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.3 (node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

c:\Users\P_1016\Source\Angular\material2-master>npm install typescript@2.4.2 npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but npm-shrinkwrap.json was generated for lockfileVersion@0. I'll try to do my best with it! npm WARN @angular/upgrade@5.0.5 requires a peer of @angular/core@5.0.5 but none is installed. You must install peer dependencies yourself. npm WARN @angular/upgrade@5.0.5 requires a peer of @angular/compiler@5.0.5 but none is installed. You must install peer dependencies yourself. npm WARN @angular/upgrade@5.0.5 requires a peer of @angular/platform-browser@5.0.5 but none is installed. You must install peer dependencies yourself. npm WARN @angular/upgrade@5.0.5 requires a peer of @angular/platform-browser-dynamic@5.0.5 but none is installed. You must install peer dependencies yourself. npm WARN typescript-eslint-parser@1.0.2 requires a peer of typescript@~2.0.3 but none is installed. You must install peer dependencies yourself. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.3 (node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

c:\Users\P_1016\Source\Angular\material2-master>ng serve Cannot read property 'config' of null TypeError: Cannot read property 'config' of null at Class.run (c:\Users\P_1016\Source\Angular\material2-master\node_modules\@angular\cli\tasks\serve.js:51:63) at check_port_1.checkPort.then.port (c:\Users\P_1016\Source\Angular\material2-master\node_modules\@angular\cli\commands\serve.js:123:26) at at process._tickCallback (internal/process/next_tick.js:188:7)

c:\Users\P_1016\Source\Angular\material2-master>

jelbourn commented 6 years ago

See https://github.com/angular/material2/blob/master/DEV_ENVIRONMENT.md

This repo does not use Angular CLI

jbistis commented 6 years ago

TypeError: Cannot read property 'config' of null at Class.run (dev2/material2-master/node_modules/@angular/cli/tasks/serve.js:51:63) at check_port_1.checkPort.then.port (dev2/material2-master/node_modules/@angular/cli/commands/serve.js:123:26) at at process._tickCallback (internal/process/next_tick.js:188:7)

Getting a similar issue trying trying to run ng serve. Any update on a fix?

jbistis commented 6 years ago

Running...Angular CLI: 1.6.6 Node: 8.9.4 OS: darwin x64 Angular: 5.1.1 ... animations, bazel, common, compiler, compiler-cli, core ... forms, http, platform-browser, platform-browser-dynamic ... platform-server, router

@angular/cli: 1.6.6 @angular/upgrade: 5.0.5 @angular-devkit/build-optimizer: 0.0.42 @angular-devkit/core: 0.0.29 @angular-devkit/schematics: 0.0.52 @ngtools/json-schema: 1.1.0 @ngtools/webpack: 1.9.6 @schematics/angular: 0.1.17 typescript: 2.5.3 webpack: 3.10.0

angular-automatic-lock-bot[bot] commented 4 years ago

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.