Angular-cli: Feedback for updating 5->6

Created on 5 May 2018  Â·  4Comments  Â·  Source: angular/angular-cli

Versions

ng --version

     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / â–³ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/


Angular CLI: 6.0.0
Node: 8.10.0
OS: darwin x64
Angular: 5.2.9
... animations, common, compiler, compiler-cli, core, forms
... http, platform-browser, platform-browser-dynamic
... platform-server, router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.6.0
@angular-devkit/build-angular     0.6.0
@angular-devkit/build-optimizer   0.6.0
@angular-devkit/core              0.6.0
@angular-devkit/schematics        0.6.0
@angular/cdk                      5.2.4
@angular/cli                      6.0.0
@angular/flex-layout              5.0.0-beta.14
@angular/material                 5.2.4
@ngtools/webpack                  6.0.0
@schematics/angular               0.6.0
@schematics/package-update        <error>
@schematics/update                0.6.0
rxjs                              5.5.10
typescript                        2.8.1
webpack                           4.6.0

Repro steps

Followed the instructions from https://update.angular.io/

Observed behavior

1qeaybsuxya

  1. On update.angular.io would be nice to display how to check node version
  2. When running "npm install @angular/cli", version from package.json gets installed instead of 6.
  3. Getting a bunch of smaller errors, e.g. below
ERROR in ./node_modules/source-map-support/source-map-support.js
Module not found: Error: Can't resolve 'path' in '/Users/kirjs/code/angular-presentation/node_modules/source-map-support'
ERROR in ./src/app/codelabs/extra/ast/samples/hello-world.json (./node_modules/raw-loader!./src/app/codelabs/extra/ast/samples/hello-world.json)
Module parse failed: Unexpected token m in JSON at position 0
You may need an appropriate loader to handle this file type.
SyntaxError: Unexpected token m in JSON at position 0
    at JSON.parse (<anonymous>)
    at JsonParser.parse (/Users/kirjs/code/angular-presentation/node_modules/webpack/lib/JsonParser.js:15:21)
    at doBuild.err (/Users/kirjs/code/angular-presentation/node_modules/webpack/lib/NormalModule.js:375:32)
    at runLoaders (/Users/kirjs/code/angular-presentation/node_modules/webpack/lib/NormalModule.js:272:12)
    at /Users/kirjs/code/angular-presentation/node_modules/loader-runner/lib/LoaderRunner.js:370:3
    at iterateNormalLoaders (/Users/kirjs/code/angular-presentation/node_modules/loader-runner/lib/LoaderRunner.js:211:10)
    at iterateNormalLoaders (/Users/kirjs/code/angular-presentation/node_modules/loader-runner/lib/LoaderRunner.js:218:10)
    at /Users/kirjs/code/angular-presentation/node_modules/loader-runner/lib/LoaderRunner.js:233:3
    at runSyncOrAsync (/Users/kirjs/code/angular-presentation/node_modules/loader-runner/lib/LoaderRunner.js:130:11)
    at iterateNormalLoaders (/Users/kirjs/code/angular-presentation/node_modules/loader-runner/lib/LoaderRunner.js:229:2)
    at Array.<anonymous> (/Users/kirjs/code/angular-presentation/node_modules/loader-runner/lib/LoaderRunner.js:202:4)
    at Storage.finished (/Users/kirjs/code/angular-presentation/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:43:16)
    at provider (/Users/kirjs/code/angular-presentation/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:79:9)
    at /Users/kirjs/code/angular-presentation/node_modules/graceful-fs/graceful-fs.js:78:16
    at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:511:3)
ERROR in chunk extra-ast-ast-module
[name].js
Cannot read property 'replace' of undefined

Solved by removing source-maps-support package.
4)

ERROR in ./src/app/codelabs/extra/ast/samples/hello-world.json (./node_modules/raw-loader!./src/app/codelabs/extra/ast/samples/hello-world.json)
Module parse failed: Unexpected token m in JSON at position 0
You may need an appropriate loader to handle this file type.
SyntaxError: Unexpected token m in JSON at position 0
    at JSON.parse (<anonymous>)
    at JsonParser.parse (/Users/kirjs/code/angular-presentation/node_modules/webpack/lib/JsonParser.js:15:21)
    at doBuild.err (/Users/kirjs/code/angular-presentation/node_modules/webpack/lib/NormalModule.js:375:32)
    at runLoaders (/Users/kirjs/code/angular-presentation/node_modules/webpack/lib/NormalModule.js:272:12)
    at /Users/kirjs/code/angular-presentation/node_modules/loader-runner/lib/LoaderRunner.js:370:3
    at iterateNormalLoaders (/Users/kirjs/code/angular-presentation/node_modules/loader-runner/lib/LoaderRunner.js:211:10)
    at iterateNormalLoaders (/Users/kirjs/code/angular-presentation/node_modules/loader-runner/lib/LoaderRunner.js:218:10)
    at /Users/kirjs/code/angular-presentation/node_modules/loader-runner/lib/LoaderRunner.js:233:3
    at runSyncOrAsync (/Users/kirjs/code/angular-presentation/node_modules/loader-runner/lib/LoaderRunner.js:130:11)
    at iterateNormalLoaders (/Users/kirjs/code/angular-presentation/node_modules/loader-runner/lib/LoaderRunner.js:229:2)
    at Array.<anonymous> (/Users/kirjs/code/angular-presentation/node_modules/loader-runner/lib/LoaderRunner.js:202:4)
    at Storage.finished (/Users/kirjs/code/angular-presentation/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:43:16)
    at provider (/Users/kirjs/code/angular-presentation/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:79:9)
    at /Users/kirjs/code/angular-presentation/node_modules/graceful-fs/graceful-fs.js:78:16
    at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:511:3)
ERROR in chunk extra-ast-ast-module

This is a legit piece of json, and used to work before
5) Also this error, in the browser console, not sure how to fix

index.js:2 Uncaught ReferenceError: process is not defined
    at Object../node_modules/chalk/node_modules/supports-color/index.js (index.js:2)
    at __webpack_require__ (bootstrap:81)

Desired behavior

Everything works

Mention any other details that might be useful (optional)

schematicupdate docs

Most helpful comment

@clydin @NothingEverHappens

with regards to his number 4

ERROR in ./src/app/codelabs/extra/ast/samples/hello-world.json (./node_modules/raw-loader!./src/app/codelabs/extra/ast/samples/hello-world.json)
Module parse failed: Unexpected token m in JSON at position 0
You may need an appropriate loader to handle this file type.
SyntaxError: Unexpected token m in JSON at position 0

What are we to do? The instructions on Webpack GitHub says to modify webpack.config.js to remove .json extension from Test here https://github.com/webpack/webpack/issues/6586#issuecomment-368677035

How do we do that in non-ejected projects where webpack.config.js isn't present?

All 4 comments

I can't build and I'm going back to 5 something. I suggest updating the documentation instructions to clarify the following:
image
I'm not getting updated to 6.0, thank goodness, and please clarify "remove"--what command is that?? Just delete the compat file from package.json or do you mean npm uninstall compat file? Which is it??

@clydin @NothingEverHappens

with regards to his number 4

ERROR in ./src/app/codelabs/extra/ast/samples/hello-world.json (./node_modules/raw-loader!./src/app/codelabs/extra/ast/samples/hello-world.json)
Module parse failed: Unexpected token m in JSON at position 0
You may need an appropriate loader to handle this file type.
SyntaxError: Unexpected token m in JSON at position 0

What are we to do? The instructions on Webpack GitHub says to modify webpack.config.js to remove .json extension from Test here https://github.com/webpack/webpack/issues/6586#issuecomment-368677035

How do we do that in non-ejected projects where webpack.config.js isn't present?

Closing as Angular 6 is no longer under support.

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._

Was this page helpful?
0 / 5 - 0 ratings

Related issues

brtnshrdr picture brtnshrdr  Â·  3Comments

delasteve picture delasteve  Â·  3Comments

jmurphzyo picture jmurphzyo  Â·  3Comments

donaldallen picture donaldallen  Â·  3Comments

MateenKadwaikar picture MateenKadwaikar  Â·  3Comments