Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upng new fails if there is a node_modules directory with angular-cli in the parent dir. #2326
Comments
|
Hm, this has to do with how the global CLI finds the local CLI. Still the errors shouldn't be so obscure. |
|
Additional report for the same bug: OS?OS X El Capitan 10.11.6 (15G1004) Versions.angular-cli: 1.0.0-beta.16 Repro steps.Situation:
Steps:
The log given by the failure.
Mention any other details that might be useful.This was my first painful experience with the |
|
Fixed in #2178 |
|
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. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Win 10
ng --version. If there's nothing outputted, please runin a Terminal:
node --versionand paste the result here:do on your code? etc.
Slightly unusual in that I'm tryin to share a single node_modules across multiple projects so have node_modules in the parent directory of the one I'm trying to create the project in (created previously with the same versions and moved to the parent directory). (I create projects with --skip-npm = true then create a symlink).
Failure occurs using ng new XXXXX
Workaround is to rename the node_modules in the parent project. The revert node_modules name and create symlink which works fine.
Dir structure
// root / myFolder / node_modules ----< Renaming this temporarily is the work around
/ DoNows -- Run ng new in here
/ XXXX -- created OK once node_modules renamed
more information.
C:\course2324\DoNows>ng new Breaks
fs.js:549
return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
^
TypeError: path must be a string
at TypeError (native)
at Object.fs.openSync (fs.js:549:18)
at Object.fs.readFileSync (fs.js:397:15)
at Function.Version.fromProject (C:\Users\student\AppData\Roaming\npm\node_modules\angular-cli\upgrade\version.js:87:31)
at Function.Version.isPreWebpack (C:\Users\student\AppData\Roaming\npm\node_modules\angular-cli\upgrade\version.js:111:31)
at Function.Version.assertPostWebpackVersion (C:\Users\student\AppData\Roaming\npm\node_modules\angular-cli\upgrade\version.js:97:18)
at C:\Users\student\AppData\Roaming\npm\node_modules\angular-cli\bin\ng:25:15
at C:\Users\student\AppData\Roaming\npm\node_modules\angular-cli\node_modules\resolve\lib\async.js:44:21
at ondir (C:\Users\student\AppData\Roaming\npm\node_modules\angular-cli\node_modules\resolve\lib\async.js:187:31)
at C:\Users\student\AppData\Roaming\npm\node_modules\angular-cli\node_modules\resolve\lib\async.js:153:39