这是我的计算机信息:
节点版本10.16.0
npm版本6.9.0
环境变量C:\Users\tran.sonhoang\AppData\Roaming\npm\node_modules\@angular\cli\bin
我的问题是,当我运行ng new app-name
时,我将获得包含此信息的文件
#!/usr/bin/env node
'use strict';
// Provide a title to the process in `ps`.
// Due to an obscure Mac bug, do not start this title with any symbol.
try {
process.title = 'ng ' + Array.from(process.argv).slice(2).join(' ');
} catch(_) {
// If an error happened above, use the most basic title.
process.title = 'ng';
}
// Some older versions of Node do not support let or const.
var version = process.version.substr(1).split('.');
if (Number(version[0]) < 10 || (Number(version[0]) === 10 && Number(version[1]) < 9)) {
process.stderr.write(
'You are running version ' + process.version + ' of Node.js, which is not supported by Angular CLI 8.0+.\n' +
'The official Node.js version that is supported is 10.9 or greater.\n\n' +
'Please visit https://nodejs.org/en/ to find instructions on how to update Node.js.\n'
);
process.exit(3);
}
require('../lib/init');
这个问题对我来说太奇怪了,因为这是我第一次看到与angular-cli有关的问题。
我尝试过的事情:
但是它仍然不能解决此问题。任何帮助将不胜感激。谢谢!