maciejtreder / ng-toolkit

:star: Angular tool-box! Start your PWA in two steps! Add Serverless support for existing projects and much more
https://www.angular-universal-pwa.maciejtreder.com
MIT License
1.12k stars 156 forks source link

ERROR: Path "/functions/index.js" already exist. #428

Open BCusack opened 6 years ago

BCusack commented 6 years ago

I'm submitting a...


[x ] Bug report  
[ ] Feature request
[ ] Documentation issue or request

In package


[ ] @ng-toolkit/init
[ ] @ng-toolkit/serverless
[x ] @ng-toolkit/universal
[ ] @ng-toolkit/pwa
[ ] @ng-toolkit/firebug

Current behavior

ng add @ng-toolkit/universal produces the following error PS D:\Solutions\Ng6\Bloggerv2> ng add @ng-toolkit/universal Installing packages for tooling via npm. INFO: Project property is set to 'blogv2'. INFO: Project property is set to 'blogv2'. ERROR: Path "/functions/index.js" already exist. ERROR: If you think that this error shouldn't occur, please fill up bug report here: https://github.com/maciejtreder/ng-toolkit/issues/new INFO: stacktrace has been sent to tracking system. npm WARN @ng-toolkit/pwa@1.1.41 requires a peer of @angular/service-worker@^6.0.5 but none is installed. You must install peer dependencies yourself. npm WARN bootstrap@4.1.3 requires a peer of popper.js@^1.14.3 but none is installed. You must install peer dependencies yourself. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

I've tried to clear by renaming the functions/index.js - no good

Expected behavior

add angular universal to project

Minimal reproduction of the problem with instructions

npm new myapp --routing firebase init ng add @ng-toolkit/universal

Environment


Angular version: 6.1.0


- Node version: 8.11.1  
- Platform:  Windows

Others: VSCode
maciejtreder commented 6 years ago

@BCusack I guess that the file 'index.js' has been created by your own before applying ng-toolkit? Am I right?

BCusack commented 6 years ago

after deleting functions/index.js, I was expecting ng-toolkit to notice. Does the schema check the Path somewhere else?

parnik1989 commented 6 years ago

I also found the same issue. In actual, I had the index.js file earlier but I removed the entire functions folder from the project but still, it is showing the same error.

BCusack commented 6 years ago

Ng-toolkit add serverless overrides the /functions folder. This is what I was expecting from universal

jhourlad commented 6 years ago

Any news on this?

cstone commented 5 years ago

@maciejtreder Any update on this issue?

reinodl commented 5 years ago

Hi guys - any news on this? I know this is a relatively old thread but I encountered the same problem today because of firebase being there first.