angular: Can't create app : Cannot find module './clone.js'
I’m submitting a…
[x] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
[ ] Other... Please describe:
Current behavior
When trying to create a new app, can’t make it because of this message :
$ ng new some-app
module.js:549
throw err;
^
Error: Cannot find module './clone.js'
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/home/math/.nvm/versions/node/v8.11.4/lib/node_modules/@angular/cli/node_modules/graceful-fs/graceful-fs.js:4:13)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
Expected behavior
Should create an app
Minimal reproduction of the problem with instructions
$ node -v
8.11.4
$ npm -v
5.6.0
$ npm install -g @angular/cli
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/@angular/cli/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
+ @angular/cli@7.0.4
updated 1 package in 1.906s
$ ng new some-app
[here comes the error mentionned]
Environment
Angular version: 7.04
For Tooling issues:
- Node version: 8.11.4
- Platform: Linux Ubuntu
Others:
Nothing special
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 6
- Comments: 17 (2 by maintainers)
Just a heads up that I fixed my app with
npm install graceful-fs@4.1.13
I don’t have any to add other than I’m seeing the same error with an application created with Create React App
This issue was fixed when I have installed clone js package
npm i clone --save --dev
issue can be closed… as @droidenator mentioned:
npm install graceful-fs@4.1.13
fixes the issue.Please report the issue here https://github.com/angular/angular-cli 👍
I’m coming here by trying to create a React Native App. Same issue. Must be some module shared between the two.
sounds like a recent update on
graceful-fs
was missingclone.js
Seeing the same error when I try to run
webpack
andeslint
😢Edit: https://github.com/isaacs/node-graceful-fs/issues/139
Same thing happened to me just now. I just ran
npm install -g @angular/cli@latest
again and it updated 2 packages…now ng cli works again.