-
Notifications
You must be signed in to change notification settings - Fork 12k
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
ng fails on Version.assertPostWebpackVersion() on 1.0.0-beta.14 #2135
Comments
Same with both Windows 7 and Windows 8.1 Steps : npm install -g angular-cli@latest |
same on macOS |
same here on Mac OS sierra with node 6.5.0 |
same on Linux Mint with node 6.5 |
Same here on Mac OSX Yosemite and Windows 10 with node 6.5.0. |
any news or trick about this? |
Same on OS X El Capitan Installed latest version (*-beta.14) ng --help TypeError: path must be a string or Buffer |
@Aorewen Simplest workaround to continue working in your project is comment line 25 of node_modules/angular-cli/bin/ng : |
I just commented out line 25 on angular-cli/bin/ng . I do not know if this has to do anything with this nam error message I got after installing angular-cli: peer dep missing: webpack@1.x.x || 2.x.x, required by string-replace-loader@1.0.3 In the meanwhile I installed web pack: But I still get this error: Installed web pack@2.1.0-beta.22 but now I get the "old" message: |
Updated node to v6.6.0 and now it works ! |
I fix this for node 6.5.0 with #2178 |
Persisted in v6.6.0 for me
OS gentoo linux, angular-cli@1.0.0-beta.15 |
Same issue for me on node 6.6.0, windows 10, I just get the upgrade warning and I'm asking for the latest version of angular-cli, I've done about 5 re-install cycles now. |
I'm on a linux machine and this happens in one directory but not in another. Weird. Edit: The directory that worked was an existing project. The one that didn't work was an empty project (ng init hadn't been ran). I didn't some investigation and it's looking for the angular-cli.json file. That file doesn't exist until you run "ng init". This seems like a bug. It's impossible to create new projects. I'm not sure how this would ever work for new projects. The ng bin script checks looks for an angular-cli.json first thing and blows up when it doesn't find it. |
Upon further review, I think I see the error: https://github.com/angular/angular-cli/blob/master/packages/angular-cli/upgrade/version.ts#L79 That line should either check if the file exists or be moved into the try block below (line 82). It's trying to read in angular-cli.json. I'm not sure that's the best fix, but I changed it locally and it works. |
@caseyhoward can you make a diff? nevermind, solved by |
@caseyhoward Workaround: create blank angular-cli.json |
@hansl can you have a look? |
+1 error on node 6.6.0, npm 3.10.3, osx 10.10.5 |
+1 [imho] this should work: $ mkdir noglobal |
+1 👍 Same error here. Windows 10 |
Same with |
Strange strange strange: UPDATE: |
To me it looks like it's a thing about installing the CLI globally or not. It works for me, when I install it via |
I did install it globally and it did not work for me. |
Same here with macOS Sierra node@6.6.0 if I run
|
Same here. ng -v only worked with an angular-cli.json in the pwd. No other ng commands seem to be working. Everything was working fine before my vacation about a week ago. Not sure what changed, and why reinstalling everything didn't fix it. |
Same on ubuntu 14.04, node v6.7.0, npm 3.10.3. Please help! |
angular-cli: 1.0.0 beta.16 TypeError: path must be a string or Buffer |
I can confirm that this is happening on Mac when trying to bump from .15 to .16
Failing with this error.
|
Not sure if this is the same issue, but I'm getting this error:
Newly installed ng-cli with these version:
Barely did any coding. Added 4 components and one service, also angular/material and now this error is thrown when I run |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Arch Linux with latest kernel and Node 6.5.0 through NVM
angular-cli: 1.0.0-beta.14
node: 6.5.0
os: linux x64
Local installation, empty folder:
npm i angular-cli
./node_modules/.bin/ng init # fails
fs.js:640
return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
^
TypeError: path must be a string or Buffer
at TypeError (native)
at Object.fs.openSync (fs.js:640:18)
at Object.fs.readFileSync (fs.js:508:33)
at Function.Version.fromProject (/sec/Dev/Link/scripts/web_files_py/flask_ged/ng/node_modules/angular-cli/upgrade/version.js:87:31)
at Function.Version.isPreWebpack (/sec/Dev/Link/scripts/web_files_py/flask_ged/ng/node_modules/angular-cli/upgrade/version.js:111:31)
at Function.Version.assertPostWebpackVersion (/sec/Dev/Link/scripts/web_files_py/flask_ged/ng/node_modules/angular-cli/upgrade/version.js:97:18)
at /sec/Dev/Link/scripts/web_files_py/flask_ged/ng/node_modules/angular-cli/bin/ng:25:15
at /sec/Dev/Link/scripts/web_files_py/flask_ged/ng/node_modules/resolve/lib/async.js:44:21
at ondir (/sec/Dev/Link/scripts/web_files_py/flask_ged/ng/node_modules/resolve/lib/async.js:187:31)
at /sec/Dev/Link/scripts/web_files_py/flask_ged/ng/node_modules/resolve/lib/async.js:153:3
Commenting out the line 25 on angular-cli/bin/ng makes everything work again.
This with the check Version.assertPostWebpackVersion(), was added on commit 21003b1 .
The text was updated successfully, but these errors were encountered: