ng fails on Version.assertPostWebpackVersion() on 1.0.0-beta.14
- OS? Arch Linux with latest kernel and Node 6.5.0 through NVM
- Versions: angular-cli: 1.0.0-beta.14 node: 6.5.0 os: linux x64
- Repro steps. Local installation, empty folder: npm i angular-cli ./node_modules/.bin/ng init # fails
- The log given by the failure. 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
- Mention any other details that might be useful. Commenting out the line 25 on angular-cli/bin/ng makes everything work again. This with the check Version.assertPostWebpackVersion(), was added on commit 21003b1dc359e5d32e493911ceb5b72966d4c0ad .
+1 👍
Same error here.
Windows 10 Node 6.6.0 npm 3.10.2
Same with Linux node 6.7.0 npm 3.10.3 angular-cli 1.0.0-beta.16
Strange strange strange: I get the error in some directories and not in others!!! e.G. d:/tmp fails but d:/test/tmp works. I can not find out what distinquishes them, it does not appear to be the name or emptyness ... òO
UPDATE: After deleting what was inside d:/tmp , it works there too. Maybe it was emptyness or certain files in that folder or .git ?
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 npm install --global angular-cli, but doing it locally (npm install angular-cli) and calling it from my local node_modules-folder doesn't.
I did install it globally and it did not work for me.
Same here with macOS Sierra
[email protected] [email protected] [email protected]
if I run ng --version I get the following error:
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 (/usr/local/lib/node_modules/angular-cli/upgrade/version.js:87:31)
at Function.Version.isPreWebpack (/usr/local/lib/node_modules/angular-cli/upgrade/version.js:111:31)
at Function.Version.assertPostWebpackVersion (/usr/local/lib/node_modules/angular-cli/upgrade/version.js:97:18)
at /usr/local/lib/node_modules/angular-cli/bin/ng:25:15
at /usr/local/lib/node_modules/angular-cli/node_modules/resolve/lib/async.js:44:21
at ondir (/usr/local/lib/node_modules/angular-cli/node_modules/resolve/lib/async.js:187:31)
at /usr/local/lib/node_modules/angular-cli/node_modules/resolve/lib/async.js:153:39
Same here. ng -v only worked with an angular-cli.json in the pwd. angular-cli: 1.0.0-beta.16 node: 6.7.0 (and 6.6.0) os: win32 x64
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 ng build --prod deploy to firebase dist folder it was a mess, CSS and JS missing now cli is broken always get message c:\Dev\angular2showcase>ng --v 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 (C:\Users\Nils\AppData\Roaming\npm\node_modu
les\angular-cli\upgrade\version.js:87:31)
at Function.Version.isPreWebpack (C:\Users\Nils\AppData\Roaming\npm\node_mod
ules\angular-cli\upgrade\version.js:111:31)
at Function.Version.assertPostWebpackVersion (C:\Users\Nils\AppData\Roaming
npm\node_modules\angular-cli\upgrade\version.js:97:18)
at C:\Users\Nils\AppData\Roaming\npm\node_modules\angular-cli\bin\ng:25:15
at C:\Users\Nils\AppData\Roaming\npm\node_modules\angular-cli\node_modules\r
esolve\lib\async.js:44:21
at ondir (C:\Users\Nils\AppData\Roaming\npm\node_modules\angular-cli\node_mo
dules\resolve\lib\async.js:187:31)
at C:\Users\Nils\AppData\Roaming\npm\node_modules\angular-cli\node_modules\r
esolve\lib\async.js:153:39
I can confirm that this is happening on Mac when trying to bump from .15 to .16
Visit http://ember-cli.com/user-guide/#watchman for more info.
angular-cli: 1.0.0-beta.16
node: 6.3.1
os: darwin x64
Failing with this error.
Path must be a string. Received null
TypeError: Path must be a string. Received null
at assertPath (path.js:7:11)
at Object.resolve (path.js:1148:7)
at Class.exports.default.Task.extend.run (/Users/zchapple/code/wfa_ng2/node_modules/angular-cli/tasks/build-webpack-watch.js:14:26)
at Class.Command.extend.run (/Users/zchapple/code/wfa_ng2/node_modules/angular-cli/commands/build.js:50:26)
at Class.<anonymous> (/Users/zchapple/code/wfa_ng2/node_modules/angular-cli/lib/models/command.js:152:17)
at tryCatch (/Users/zchapple/code/wfa_ng2/node_modules/rsvp/dist/lib/rsvp/-internal.js:215:12)
at invokeCallback (/Users/zchapple/code/wfa_ng2/node_modules/rsvp/dist/lib/rsvp/-internal.js:230:13)
at publish (/Users/zchapple/code/wfa_ng2/node_modules/rsvp/dist/lib/rsvp/-internal.js:198:7)
at flush (/Users/zchapple/code/wfa_ng2/node_modules/rsvp/dist/lib/rsvp/asap.js:82:5)
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)
Not sure if this is the same issue, but I'm getting this error:
Path must be a string. Received { source: 'environments/environment.ts',
dev: 'environments/environment.ts',
prod: 'environments/environment.prod.ts' }
Newly installed ng-cli with these version:
angular-cli: 1.0.0-beta.25.5
node: 6.7.0
os: darwin x64
@angular/common: 2.4.3
@angular/compiler: 2.4.3
@angular/core: 2.4.3
@angular/forms: 2.4.3
@angular/http: 2.4.3
@angular/material: 2.0.0-beta.1
@angular/platform-browser: 2.4.3
@angular/platform-browser-dynamic: 2.4.3
@angular/router: 3.4.3
@angular/compiler-cli: 2.4.3
Barely did any coding. Added 4 components and one service, also angular/material and now this error is thrown when I run ng serve
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.