Strapi Admin infinite loop - file-permissions

I'm kinda new to strapi. actually this the first time to try it. so i followed the documentation and was able to get the first page to work but admin page always go blank. sadly i don't know nodeJs or react so I'm not sure about what to do in here but seems there's something wrong with the permissions please check the attached image.
i've tried
npm install in the project root directory.
npm run setup in the project root directory.
as mentioned in this issue on github but it want's useful
I'm using
strapi 3 alpha
nodeJs 11
npm 6+
mariaDB 10.1
windows 10 64bit

I suggest you to clean the database your use. And when it's done, restart your Strapi server. It will re-create all table needed by Strapi.

So simply, I checked strapi website to find out that version 3 is out of the alpha status and then I installed the newer version and tried to use it and it did work so seems some bug was in the alpha edition which strapi team has fixed by themselves

I had a similar issue after setting up SSL on Digital Ocean one-click. I just ran npm run build. I did not do anything with the database.

Related

Getting error at while installing node in windows7

i am getting at the time while i install node and npm on my windows7 os. Can any body help me so that i can fixed my problem to move ahead.enter image description here
you did not specify how are you trying to install node.
you can head to nodejs download page, download node installation and then install it.
I'm assuming that as you tagged your question with 'chocolatey' that your issue is similar to this one?
If that is the case the best port of call would be to raise an issue for the NodeJS team if you are having issues like this.
If this is a different issue, as Mr said above, we really need more info.

Why does PM2 work on one server, but not on another?

We have two instances of our Node-Express app: one for development, and one for production. We are implementing PM2 process manager. This is for a Windows Server 2012 environment.
For some baffling reason, PM2 (with pm2-windows-service) worked fine when set up in our dev environment, but won't even run node in our Prod environment. What could be the cause?
Log files reveal nothing helpful
If you look at my related question, you can see that PM2 appears to be launching node, but is not (or it instantly crashes).
All we can conclude is there is some difference in settings between these two servers. Any clue what difference in settings might be causing PM2 to fail like this?
This is related to a more specific question I have out there about issues we're having implementing PM2.
Thank you!
Ok, I got the answer after posting an issue to the pm2 github issues page.
Sharing it here in case anyone else finds themselves in this situation:
https://github.com/Unitech/pm2/issues/4113
(basically pm2 3.2.5 introduced a bug that causes this issue in Windows. My QA install was 3.2.4. The issue was resolved by reverting to 3.2.4. Simple process, see instructions at link above.)
It may be not really pm2 issue, bit more npm. On the server where pm2 doesn't work please try that command in PowerShell:
Get-Command pm2
Does it return the correct version(not 0.0.0)? If not, there is an issue diring installing that package, so as an option it's possible to install that manually. Also we asked familiar question in that ticket last month:
https://github.com/Unitech/pm2/issues/3964
Like it described in a ticket above you can try to check other npm package with familiar issues:
npm install mocha -g
And that try to reach mocha-cli

Azure and node js __dirname

Probably it is not specifically related to webpack/memory-fs, but I am getting the RangeError: Maximum call stack size exceeded error (see below for a call stack).
I have found out, that __dirname on Azure (webapp) returns \\100.78.172.13\volume-7-default\8f5ecde749dace2bb57a\4e07195f015b45ce8e9ba255dc901988\site\repository\Source\Website\Content\app\node_modules\webpack\node_modules\memory-fs\lib\normalize.js in my situation, while process.cwd() returns D:\home\site\repository\Source\Website\Content\app.
Is anything can be done from my side to configure node js to return D:\... instead of \\.. ?
Gist
How to reproduce:
Clone the https://github.com/intellismiths/webapp1 repository.
Create new Azure Web App (default settings).
Configure deployment source to use GitHub.
Click Sync. It will take 10+ minutes to complete and it will show that the deployment was successful.
Go to Application settings in Azure and change WEBSITE_NODE_DEFAULT_VERSION to 6.2.2
Go to kudu page and open powershell console.
Execute npm cache clean
Check node version by executing node -v. It should be v6.2.2
On Azure, navigate to D:\home\site\respository\src\WebApp1
Execute npm run build
In console, you should see a lot of errors which indicates that modules can not be resolved.
OPTIONAL. Test npm run build on your local machine - it should produce wwwroot/app.js without errors.
Update webpack.config.js to include context: __dirname to fix previous errors.
Execute npm run build
In console, you should see the "RangeError: Maximum call stack size exceeded" error.
Update 1
I only tried to set 6.2.2 runtime after adding the second package.json, so the project structure is not the simplest possible. Maybe just setting node to 6.2.2 breaks the build.
I could reproduce your issue following your steps. I found the key point was setting the WEBSITE_NODE_DEFAULT_VERSION to 6.2.2. And I found the webpack task worked fine if the WEBSITE_NODE_DEFAULT_VERSION was under 6.
Please downgrade the setting WEBSITE_NODE_DEFAULT_VERSION to the version under 6 e.g. 5.9.0 if your node.js modules do not need such high version.
And according the package.json of angular2 athttps://github.com/angular/angular/blob/master/package.json, it seems that the angular2 repository requires the node.js version between 5.4 and 6.
Additionally, the web application's root directory on Azure Web Apps is D:\home\site\wwwroot. So if you want to build your frontend project on Azure Web Apps, you need to locate to D:\home\site\wwwroot\wwwroot\mobile-web-app then run npm run build.
It's been fixed in master and it's proposed to be included in v6.4.0.
See: https://github.com/nodejs/node/issues/7175#issuecomment-239824532 and https://github.com/nodejs/node/pull/8070
After a long day of research, trial-and-error and various experimentation, I've found an acceptable workaround if you're not willing to downgrade to Node 5.*:
Downgrade to Node 6.1.0
Make sure to install webpack globally (with npm install -g webpack).
Just using 6.1.0 gets around the "maximum call stack size exceeded" error, but instead gave me a lot of resolve failures when running webpack from node_modules (using ./node_modules/.bin/webpack). Installing webpack globally finally got me past that.
If I understand it correctly, this whole issue with __dirname in Node >= 6.2 resolving to the UNC folder path instead of the mounted path is going to be fixed, there's an active discussion here.
I had the same issue.
Fixed it with UPGRADING npm not DOWNGRADING.
Bug is fixed in the npm versions newer than 6.5.
https://github.com/aumanjoa/chronas-community/blob/master/package.json#L48
I believe that your __dirname shows your persistant drive where the data is stored, while .cwd gives current directory from where node ran. This is because Azure runs from the Drive but files are stored at the persistent drive.
In your Gruntfile.js add
module.exports = function (grunt) {
grunt.file.setBase(__dirname);
// Code omitted
}
Refer: link

running node.js sails app on openshift

I'm trying to deploy my node.js sails app on openshift. I followed procedure outlined in https://gist.github.com/mdunisch/4a56bdf972c2f708ccc6 but still doesn't work.
also try this: Node.js app on openshift
no matter what i'm getting "Service Temporarily Unavailable"
The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later. Error.
Hopefully someone can at least point me to the right direction.
Thanks in advance.
I have also deployed my application onto openshift and here are my steps
Create a node.js Cartridges 0.10
In the repo, please mention "https://github.com/ryanj/nodejs-custom-version-openshift" since my sails need npm version 1.4.0 and the original one is 1.3.X
git clone the repo
copy your file into that repo
Follow this page https://gist.github.com/mdunisch/4a56bdf972c2f708ccc6
The first two steps should be done if you haven't changed the original stuff. The only things is to change ".openshift/action_hooks/pre_start_nodejs" and append that at the end to make it is as a production and run the grunt
git add . and git push
It will automatically build and at the end will tell you deployment completed with status: success
I am also new but hope you can try. Thanks
One more things, if missing the step 5, you won't run the sails and can't see the log in the terminal and result in 503 on browser.
But I have another question after each push on openshift, you can see my log if you want to know what is the right status
Why mongodb is reset after push to openshift
Another suggestion is to ssh and make sure the npm -v is larger than 1.4.0, try to npm install -g npm to update the version.
If still fails, i will suggest to npm install sails -g and try to commit and look for the build..

How to start an appfog locomotive.js app?

I'm using the node framework locomotive.js on an appfog instance. Installing this caused a slew of errors and I couldn't get the app to start. Reviewing the help materials and working with appfog support we were able to resolve that the issue had to do with the package.json file and specifically the invocation of lcm server.
What is correct package.json property?
You might check out https://github.com/hakaider/locomotive-appfog-sample
I just cloned it into my directory, ran npm install, then af update [my app name here] and it just worked.

Resources