Skip to content

Update the documentation on how to update to webpack #2133

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

Closed
nbuso opened this issue Sep 15, 2016 · 5 comments · Fixed by #2151
Closed

Update the documentation on how to update to webpack #2133

nbuso opened this issue Sep 15, 2016 · 5 comments · Fixed by #2151

Comments

@nbuso
Copy link

nbuso commented Sep 15, 2016

Please provide us with the following information:

  1. OS? Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)
    Linux fedora 24
  2. Versions. Please run ng --version. If there's nothing outputted, please run
    in a Terminal: node --version and paste the result here:

$ ng --version
(node:28399) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
Could not start watchman; falling back to NodeWatcher for file system events.
Visit http://ember-cli.com/user-guide/#watchman for more info.
angular-cli: 1.0.0-beta.10
node: 6.5.0
os: linux x64

  1. Repro steps. Was this an app that wasn't created using the CLI? What change did you
    do on your code? etc.

npm uninstall -g angular-cli
npm cache clean
npm install -g [email protected]

move to a temporary directory and generate a new project
ng new beta10-update
cd beta10-update

follow the update guide
https://github.com/angular/angular-cli/blob/master/WEBPACK_UPDATE.md

I past here the steps:

Global package:

npm uninstall -g angular-cli
npm cache clean
npm install -g angular-cli@webpack

Local project package:

commit any changes you have to git first

rm -rf node_modules dist tmp typings
npm install --save-dev angular-cli@webpack

ng init

  1. The log given by the failure. Normally this include a stack trace and some
    more information.

with the last command 'ng init' you get the following message:

It seems like you're using a project generated using an old version of the Angular CLI.
The latest CLI now uses webpack and includes a lot of improvements, include a simpler
workflow, a faster build and smaller bundles.

To get more info, including a step-by-step guide to upgrade the CLI, follow this link:

https://github.com/angular/angular-cli/wiki/Upgrading-from-Beta.10-to-Beta.12

  1. Mention any other details that might be useful.
    The documentation is saying "Upgrading from [email protected] to the angular-cli@webpack", that is exactly what I'm doing but the steps are leading to an error.

The error message provide another documentation page (https://github.com/angular/angular-cli/wiki/Upgrading-from-Beta.10-to-Beta.12). That is even more confusing because try to explain how to move from "Beta.10 to Beta.12" that is overlapping with the other documentation title (angular-cli@webpack lead to beta.14 currently)


Thanks! We'll be in touch soon.

@nbuso
Copy link
Author

nbuso commented Sep 15, 2016

sorry guys I inadvertently used some formatting, I hope it's still comprehensible.

@nbuso
Copy link
Author

nbuso commented Sep 15, 2016

I just noticed from https://github.com/angular/angular-cli

Prerequisites

The generated project has dependencies that require Node 4.x.x and NPM 3.x.x.

can I use node 6.5.0? is the prerequisites are node >= 4.x.x?

@aszechlicki
Copy link

you can certainly use Node 6.5.0
I'm not sure if the document is up to date, afaik minimum node version is 6.3.0 - someone correct me if i'm wrong

@jbeckton
Copy link

I too am having issues upgrading.. Two docs updated just 4 days apart, which is the correct document?

I started with this doc https://github.com/angular/angular-cli/blob/master/WEBPACK_UPDATE.md and got the same message as the OP when running "ng init" which led me to https://github.com/angular/angular-cli/wiki/Upgrading-from-Beta.10-to-Beta.12 .

Firstly, I do not see a Beta 12 release for the CLI webpack or otherwise.

Secondly I am getting a lot of errors when running the "sudo npm install -g angular-cli@latest"

npm WARN deprecated [email protected]: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: This package has been discontinued in favor of lodash@^4.0.0.
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: ReDoS vulnerability parsing Set-Cookie https://nodesecurity.io/advisories/130
/usr/local/bin/ng -> /usr/local/lib/node_modules/angular-cli/bin/ng

> [email protected] install /usr/local/lib/node_modules/angular-cli/node_modules/node-zopfli
> node-pre-gyp install --fallback-to-build

node-pre-gyp ERR! Tried to download: https://node-zopfli.s3.amazonaws.com/Release/zopfli-v1.4.0-node-v48-linux-x64.tar.gz 
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v48 ABI) (falling back to source compile with node-gyp) 
gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/6.2.2"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/angular-cli/node_modules/node-zopfli/.node-gyp"
make: Entering directory `/usr/local/lib/node_modules/angular-cli/node_modules/node-zopfli/build'
make: *** No rule to make target `../.node-gyp/6.2.2/include/node/common.gypi', needed by `Makefile'.  Stop.
make: Leaving directory `/usr/local/lib/node_modules/angular-cli/node_modules/node-zopfli/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/angular-cli/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)
gyp ERR! System Linux 3.10.0-327.28.3.el7.x86_64
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/angular-cli/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/usr/local/lib/node_modules/angular-cli/node_modules/node-zopfli/lib/binding/node-v48-linux-x64/zopfli.node" "--module_name=zopfli" "--module_path=/usr/local/lib/node_modules/angular-cli/node_modules/node-zopfli/lib/binding/node-v48-linux-x64"
gyp ERR! cwd /usr/local/lib/node_modules/angular-cli/node_modules/node-zopfli
gyp ERR! node -v v6.2.2
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok 
node-pre-gyp ERR! build error 
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/angular-cli/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/usr/local/lib/node_modules/angular-cli/node_modules/node-zopfli/lib/binding/node-v48-linux-x64/zopfli.node --module_name=zopfli --module_path=/usr/local/lib/node_modules/angular-cli/node_modules/node-zopfli/lib/binding/node-v48-linux-x64' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/angular-cli/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at emitTwo (events.js:106:13)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:852:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)
node-pre-gyp ERR! System Linux 3.10.0-327.28.3.el7.x86_64
node-pre-gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/angular-cli/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /usr/local/lib/node_modules/angular-cli/node_modules/node-zopfli
node-pre-gyp ERR! node -v v6.2.2
node-pre-gyp ERR! node-pre-gyp -v v0.6.30
node-pre-gyp ERR! not ok 
Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/angular-cli/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/usr/local/lib/node_modules/angular-cli/node_modules/node-zopfli/lib/binding/node-v48-linux-x64/zopfli.node --module_name=zopfli --module_path=/usr/local/lib/node_modules/angular-cli/node_modules/node-zopfli/lib/binding/node-v48-linux-x64' (1)
npm WARN install:[email protected] [email protected] install: `node-pre-gyp install --fallback-to-build`
npm WARN install:[email protected] Exit status 1
/usr/local/lib
`-- [email protected] 
  `-- UNMET PEER DEPENDENCY [email protected]

@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants