Error: EPERM: operation not permitted, stat - javascript

I recently started using Firebase Functions for my Flutter project.
I saw that there is a code generator (firebase_functions_interop) that will transform your Dart code to Javascript code. This enables you to develop your cloud functions in Dart which is pretty nice.
But after developing my first cloud function and trying to deploy it to Firebase with the Firebase CLI, I constantly get the following error message:
Error: EPERM: operation not permitted, stat 'C:\PATH_TO_MY_FIREBASE_PROJECT\build\node\packages'
I'm new to npm & Firebase Functions so maybe I'm doing something fundamentally wrong.
It looks like something about permissions maybe? I don't know. But I also have full permissions on my workspace folder & have enabled VSCode as an Administrator
I have already tried to clean my npm cache & reinstalling my npm version.
Let me know if you need me to post anything else.

make sure you do not have the firebase emulator running! it will cause this error when trying to do a deployment to the firebase cloud.

Related

Expo app thowing file missing error though files are actually present there

I am using pnpm to create expo app. Just created pnpm create expo-app, installed dependencies and then run yarn android === expo start --android.
Tried shamefully-hoisting as well as moving project to location with no spaces in path but each time I get the same error.
I manually checked, all the files that are shown missing in error are actually present there.
How do I fix this?
Error: Unable to resolve module ./node_modules\expo\AppEntry from C:\Users\HariC\AndroidStudioProjects\chat/.:
None of these files exist:
* node_modules\expo\AppEntry(.native|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.js|.native.js|.js|.android.jsx|.native.jsx|.jsx|.android.json|.native.json|.json)
* node_modules\expo\AppEntry\index(.native|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.js|.native.js|.js|.android.jsx|.native.jsx|.jsx|.android.json|.native.json|.json)
at ModuleResolver.resolveDependency (C:\Users\HariC\AndroidStudioProjects\chat\node_modules\.pnpm\metro#0.72.3\node_modules\metro\src\node-haste\DependencyGraph\ModuleResolution.js:152:15)
at DependencyGraph.resolveDependency (C:\Users\HariC\AndroidStudioProjects\chat\node_modules\.pnpm\metro#0.72.3\node_modules\metro\src\node-haste\DependencyGraph.js:264:43)
at C:\Users\HariC\AndroidStudioProjects\chat\node_modules\.pnpm\metro#0.72.3\node_modules\metro\src\lib\transformHelpers.js:170:21
at Server._resolveRelativePath (C:\Users\HariC\AndroidStudioProjects\chat\node_modules\.pnpm\metro#0.72.3\node_modules\metro\src\Server.js:1196:12)
at async Server.requestProcessor [as _processBundleRequest] (C:\Users\HariC\AndroidStudioProjects\chat\node_modules\.pnpm\metro#0.72.3\node_modules\metro\src\Server.js:484:37)
at async Server._processRequest (C:\Users\HariC\AndroidStudioProjects\chat\node_modules\.pnpm\metro#0.72.3\node_modules\metro\src\Server.js:435:9)
Since android didn't work. I tried running web and I was prompted to install #expo/webpack-config. I installed it using expo install #expo/webpack-config#^0.17.2 and wow… It worked!

Error pushing React app to Heroku - "remote rejected main-> main (pre-reseive hook declined)"

I'm gettig this very frustrating erro while trying to push my React app to Heroku. I was able to push it up with no problem in the application's earlier development, but for some reason it now gives me the same error message all the time:
! [remote rejected] main -> main (pre-receive hook declined) error: failed to push some refs to 'https://git.heroku.com/sapient-origin-alpha.git'
The only thing I can think of is that there is some issue with the version of react I'm using (I tried react 18 and 17, both gave the same results). But again, I was able to push it up before with no problem so I'm not sure. My other thought was that it's the client-side package.json since it's saying the build is failing.
Another thing worth mentioning is that I re-named the Heroku app, but afterwards I removed my local git remote and created a new git remote with the updated Heroku app name. So maybe this had something to do with it? This is basically what I did:
*rename heroku app*
$ git remote rm heroku
$ heroku git:remote -a sapient-origin-alpha
If anyone is able to help me on this I would very greatly appreciate it.
Nevermind I'm just dumb. It literally told me what was wrong in the error message slightly above the text in the image I provided.
The problem was in the client-side package.json because of some dependency I was using. Make sure to double check your package.json file for things that could be causing a similar error, and delete your package-lock.json then run npm i again to refresh the file.

Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'

I am developing a mobile app with using react-native on WebStorm and trying to test it via an Android emulator(Pixel API 28) which I created via using AVD Manager of Android Studio. The problem is when I run the react-native run-android command, I get the following error:
Could not determine the dependencies of task ':app:preDebugBuild'.
> Could not resolve all task dependencies for configuration
':app:debugRuntimeClasspath'.
> Could not resolve com.facebook.react:react-native:+.
Required by:
project :app
> Failed to list versions for com.facebook.react:react-native.
> Unable to load Maven meta-data from
https://jcenter.bintray.com/com/facebook/react/react-native/maven-metadata.xml.
> Could not HEAD
'https://jcenter.bintray.com/com/facebook/react/react-native/maven-metadata.xml'.
> Connect to jcenter.bintray.com:443 [jcenter.bintray.com/35.158.228.205, jcenter.bintray.com/3.120.47.203] failed: Read timed out
I tried to clean up the cache with using the command below but it did not worked:
npm cache clean --force
I could not find some similar problems on the web and I am not sure what to show related with this problem.
When I try to run one of my previous project which was perfectly running, after getting this error and I saw that it also throws the same error. Similarly, when I create a new react-native project and try to run it, then I also got the same error. How can I solve this?
I am still loking for a solution. Anyone knows how to solve it?
I finally figured out the problem. I was connecting to internet via my school's network and it was restricting some downloads. So, that is why I got this error. For the ones who encountered with the same error, try to connect to the link in the error to if it is forbidden or not.

Firebase Deploy - "Unable to Authorize" error

I tried to deploy a very simple site for a Firebase project I have set up, and followed the following steps:
firebase login (I was already logged in since I have other projects I'm working on)
firebase init (created the .firebaserc and database.rules.json files).
firebase deploy
On deploy, I keep getting the following error message:
λ firebase deploy
! Your CLI authentication needs to be updated to take advantage of
new features.
! Please run firebase login --reauth
Error: Unable to authorize access to project [PROJECT NAME]
I succesfully ran firebase login --reauth and I still get this.
Anyone know what I could be doing wrong here?
First warning shows you have to update firebase-cli.
Run this command to update:
npm install -g firebase-tools
Your project may not have been linked which causes that error.
Run this command to link the project:
firebase use --add
It will list down the projects in your firebase account, select the correct one and try deploying the project using:
firebase deploy
PS: You don't have to append project_id to deploy command every time once you run use --add command
Found my answer in another post
It seems that when deploying, you're supposed to deploy with:
firebase deploy --project [PROJECT ID, not PROJECT NAME]

Building Meteor app returns Error: EPERM, symlink

I'm attempting to build a Meteor application in an offline environment, with local web servers but no access to the outside Internet.
On running meteor build ./output I get the following:
...AppData\Local\.meteor\packages\templating\1.1.9\plugin.compileTemplatesBatch.os\npm\node_modules\meteor\promise\node_modules\meteor-promise\promise_server.js:116
throw error;
Error: EPERM, symlink '..\babylon\bin\babylon.js'
This application runs fine in localhost, doesn't seem to have any issues, but on attempting to build or bundle the app I run into these issues.
Additional (perhaps useful) info:
meteor build ./output --verbose returns the following (unnecessary packages omitted)
Local package version is up-to-date: templating#1.1.9
Local package version is up-to-date: templating-tools#1.0.4
Thanks
You need to run meteor as an administrator, then it can create the symlinks.

Categories