Sorry for my english. When I want to write file in Meteor on production, I have an error.
[Error: EACCES: permission denied, open '/app/bundle/programs/server/../web.browser/app/data/market-prices-list.json']
errno: -13,
code: 'EACCES',
syscall: 'open',
path: '/app/bundle/programs/server/../web.browser/app/data/market-prices-list.json'
I think that it is related to the rights to the folder. I use Ubuntu for development and Meteor Galaxy for production.
Galaxy does not provide means for persistent storage.
For temporary files, you can use /tmp, but if you need persistent storage, you should use an external service or another deployment target.
Related
I am getting an error message
Build failed: npm ERR! Cannot read property 'firebase-admin' of undefined\n\nnpm ERR!
A complete log of this run can be found in:\nnpm ERR!
/www-data-home/.npm/_logs/2022-11-23T04_36_44_234Z-debug.log; Error ID: beaf8772"
Where is this www-data-home location?
I was having the same error, updated package.json to use engine: 16, deployed again and then it worked (believe it forced updating all npm that could have been corrupted remotely).
As mentioned in this documentation on Viewing logs
Logs for Cloud Functions are viewable either in the Google Cloud
Console, Cloud Logging UI, or via the firebase command-line tool.
Using the Firebase CLI To view logs with the firebase tool, use the
functions:log command: firebase functions:log
To view logs for a specific function, provide the function name as an
argument:
firebase functions:log --only <FUNCTION_NAME> For the full range
of log viewing options, view the help for functions:log:
firebase help functions:log
You can view logs for Cloud Functions in the Cloud Logging UI using
filter as those resource types
resource.type="cloud_function"
Refer this npm docs on npm logging.
The npm CLI has various mechanisms for showing different levels of
information back to end-users for certain commands, configurations &
environments.
All logs are written to a debug log, with the path to that file
printed if the execution of a command fails.You can find the
npm-debug.log file in your .npm directory. To find your .npm
directory, use npm config get cache.
You can also check this stackoverflow thread
I am using "firebase serve" to test my Firebase web app locally. I ran into this error every time:
Error: EACCES: permission denied, open
'/Users/[my_user_name]/.config/configstore/#google-cloud/functions-emulator/.functions.json'
You don't have access to this file.
Error: EACCES: permission denied, open
'/usr/local/lib/node_modules/firebase-tools/node_modules/#google-cloud/functions-emulator/logs/cloud-functions-emulator.log'
It does work with a sudo. But I don't want to type in my sudo password every time. Every other command works fine without sudo except for this one.
If you don't want to run sudo every time, you need to install node in your home directory where you have full control. Don't use the node that you may have installed with a package manager using the system's default settings. The typical tool to help you with a home directory installation is Node Version Manager (nvm).
I am using Artifactory Professional, version 5.6.0 rev 50600900
When I try to deploy a file through the Artifactory web UI, I'm getting an error: '<filename> is undefined' in a red popup box.
When I look in the system log, I see:
2018-05-15 08:25:41,037 [http-nio-8081-exec-123] [ERROR] (o.a.r.c.e.GlobalExceptionMapper:48) - Permission denied
java.io.IOException: Permission denied
The time corresponds to the time I tried the deploy
Uploads using a curl command or via the Artifactory plugin in Jenkins work without any problems.
I am an administrator on Artifactory. other users with Delete/Overwrite, Deploy/Cache, Annotate and Read also are not able to upload to repos via the web UI.
I get the undefined error with all files i try to deploy, large or small. this error occurs for users on windows, mac os and linux.
thanks in advance for any help.
Looks like an file system permissions issue. Make sure that the OS user running Artifactory has write permissions to <ARTIFACTORY_HOME>/data/tmp.
The artifacts uploaded from the UI are temporally saved under this folder.
I've been working on a Firebase functions project, running the service locally for testing.
It was all working fine, but then I moved the source folder to a new location (into source control), and now it won't run, because something, somewhere remembers the old location of the project.
So where the heck is Firebase 'remembering' the original location of the project/source?
And how do I fix it?
More info:
Platform: Windows 7
Node: v6.11.1 (as advised by: https://cloud.google.com/functions/docs/writing)
Below is what the output looks like when I run 'firebase serve --only functions' and hit the service URL.
Ignore the lines with "Failed to emulate..." and "No HTTPS..." - That is normal.
The next "error:" line, and the rest is emitted when the URL is hit.
The important points are:
a) The folder my project is in is shown on the first line (In standard Windows CMD prompt fashion)
b) The "Cannot find module" error is looking in A COMPLETELY DIFFERENT
FOLDER. In fact, it is looking where the project USED to be.
D:\_DEV\svn\FredSays\onGoogleAssistant\functions>firebase serve --only functions
=== Serving from 'D:\_DEV\svn\FredSays\onGoogleAssistant'...
i functions: Preparing to emulate HTTPS functions. Support for other event types coming soon.
! functions: Failed to emulate FredSays
i functions: No HTTPS functions emulated. Support for other function types are coming soon.
error: module.js:471
throw err;
^
Error: Cannot find module 'D:\_DEV\FredSays\actionssdk-say-number-nodejs-master\functions'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at process.on.e (D:\_TOOLS\nvm\v6.11.1\node_modules\firebase-tools\node_modules\#google-cloud\functions-emulator\src\supervisor\worker.js:64:28)
at emitTwo (events.js:106:13)
at process.emit (events.js:191:7)
at process.nextTick (internal/child_process.js:758:12)
at _combinedTickCallback (internal/process/next_tick.js:73:7)
at process._tickCallback (internal/process/next_tick.js:104:9)
error: Function worker crashed with exit code: 1
I can't find anything in the project tree listing the old location.
I've tried all of the following:
npm cache clean
firebase init functions
firebase logout & firebase login
DEL /S /Q node_modules & npm install
npm uninstall -g firebase-tools & npm install -g firebase-tools
All of the above are no help.
Please help. My project is dead in the water right now.
I came across your post whilst researching the same problem on my Ubuntu dev environment. I copied some code from an NFS share to my home directory and can't for the life of me get it to run in the functions emulator - one of the issues was that the code was still being run on the NFS mounted path and not the local path where I was running VS Code.
The command you need to re-home the code after you move it is
$firebase use
Active Project: fbgo-9f73a
Project aliases for /home/user/firebase/chappy:
* default (site-ID)
Run firebase use --add to define a new project alias.
then start the emulator
$ firebase serve --only functions,hosting
=== Serving from '/home/user/firebase/chappy'...
i functions: Preparing to emulate functions.
i hosting: Serving hosting files from: public
✔ hosting: Local server: http://localhost:5000
✔ functions: app: http://localhost:5003/site-ID/us-central1/app
Unfortunately I don't have a 'before and after' on this to be 100% sure, please let me know if this fixes it for you.
I am trying to run ghost on the localhost. When I am doing
npm start
I am getting the below error.
ERROR: Unable to open sqlite3 database file for read/write EACCES,
permission denied
'/home/letsalign/Projects/letsalign-blog/content/data/ghost-dev.db'
Check that the sqlite3 database file permissions allow read and write
access.
Although the db has the read and write permission.
Please help