Missing file or plugin on freshly installed Cloud9 ide? - node.js

I'm currently trying to set up cloud9 on my debian server for node.js development. I followed some simple steps as described below, but there seems to be missing something and I would like to know how this can be resolved in the best way. Of course, I could start looking for the missing file on the web and put it there, but I think that's not the way to go.
What I did is this:
ssh'ed into my Debian server into my home folder
sudo git clone https://github.com/c9/core.git sdk (completed succesfully)
cd sdk
sudo ./scripts/install-sdk.sh
The installation finishes like this:
Success!
run 'node server.js -p 8080 -a :' to launch Cloud9
When I then start up the IDE with this command:
node server.js -p 1234 -l 0.0.0.0 -a rob:mypass -w /home/rob/myproject/
...everything looks good:
Starting standalone
Connect server listening at http://x.x.x.x:1234
Using basic authentication
CDN: version standalone initialized /home/rob/sdk/build
Started '/home/rob/sdk/configs/standalone' with config 'standalone'!
Cloud9 is up and running
and I can basically reach the IDE from my local browser. The problem is that it stops on the welcome screen with this loading indicator in the middle right under the cloud9 logo. The JS console shows a missing file (I've replaced my real URL):
http://myserver.de:1234/static/plugins/c9.ide.collab/notifications/bubble.js Failed to load resource: the server responded with a status of 404 (Not Found)
I then looked into the folder /home/rob/sdk/plugins/c9.ide.collab/, but it is empty.
What am I missing? Do I need to install something with npm or do I have to change the package.json file somehow? I'd really appreciate some help because I think wildly modifying and copying in files won't make things better.

edit: It turns out it was "bug in the script updating references [of some plugins]". Details: https://github.com/c9/core/pull/365
—Cheers!
Original answer:
I think think the c9.ide.collab plugin's refspec is wrong here: https://github.com/z3cka/core/commit/5f45ea38f422160a0030c5ef8d1efb19231bc78c#diff-b9cfc7f2cdf78a7f4b91a753d10865a2
I changed it back to #54aa1cbee0, ran the install-sdk.sh and it grabbed the latest version of the collab plugin. While prepping a PR, I just found 3 more plugins with bad refspecs
c9.ide.language
c9.ide.language.javascript.eslint
c9.ide.run.debug
I'm currently working on a fix for the rest of these.

Related

WordPress and React - Fronitity framework Internal Server Error

I tried this framework called Frontity. For the first try (run) everything was good, I had my demo page, and it worked well. I follow these instructions.
For the second compile I got these error, and a lot: There are multiple modules with names that only differ in casing.
Only change what I have done was this one (connecting my frontity to my WordPress): https://docs.frontity.org/getting-started/connecting-to-wordpress
(Again: for the first run, it was good.)
Nothing, literally nothing was changed, I do not even started any other software :)
After all this, I deleted everything, moved to another folder, started over the whole thing and for now I only get the same errors, and an Internal Server Error in my browser.
I have this issue with or without running the xampp server.
Any idea what went wrong?
Localhost WordPress (xampp), localhost:3000 Frontity (default), Windows 10, Chrome browser.
errors after compile
Your problem is here in the console output:
I'm not sure at which point those files with differing cases are
generated, but I think the following should fix your issue:
https://stackoverflow.com/a/53901224/2638310
Ensure that the path you used in your terminal has the correct
capitalization. For example if you're using git bash on Windows and
your project has the following path:
C:\MyProjects\project-X
If you access it using cd /c/myprojects/project-x (note the lack of
capital cases) and then run npm start you might face this problem.
The solution would be to consider the project path case-sensitive and
use it as follows:
cd /C/MyProjects/project-X

GitBash - can't enter a new command after starting npm

The solution to my problem may be simple but since I'm a beginner on command line and npm it's been hard to solve it by myself, hopefuly you know the solution:
I cloned a repository and then started npm in the command line. After I enter the command 'start npm', it shows in console that webpack was succesfuly compiled but after no matter what I input, the command line does not execute anything neither shows an error message. I've tried to input, as I've done before, a new command but it seems to add text and not a command. (see the picture)
Or if it is not a problem and i'm just misunderstanding something, please tell me.
After I enter the command 'start npm'
Judging by the image you provided, this command is starting the Webpack dev-server. This is a web server for testing your application, which will monitor your files and rebuild your app when any changes are detected. Once the server is running in a terminal, any further input on your part will be ignored. You can stop the server using Ctrl + C.
Or if it is not a problem and I'm just misunderstanding something, please tell me.
The server instance will (in its default configuration) be listening for connections from localhost on port 8080, so (depending on how your app is set up), it might now be enough to visit http://localhost:3000 in your browser to see your project running. If that's not the case, check the output in the terminal window for something like: Project is running at http://localhost:3035/
It might also help to have a look in package.json to see what else (if anything) npm start is doing.
Further reading: https://github.com/webpack/webpack-dev-server

React create app hot reload is not always working on linux

I created a react application using create-react-app boilerplate, which seems to be very popular, hot reload some times updates when any of the files changes and some times not, seems like there is a minimum duration or something like that, I'm using Ubuntu, node version 7.0, the script in package.json is npm:'react-script start' what I am missing ?
When npm start doesn’t detect changes, below are the common troubleshooting steps provided in the create-react-app documentation - link.
While an app is running with npm start and updating code in the editor should possibly refresh the broswer with the updated code.
If this doesn’t happen, try one of the following workarounds:
If the project files are directly synced to your local system from a cloud storage like Dropbox or Google Drive and you're trying to run the app in them directly, try moving it out.
Due to Webpack bug, you may need to restart the watcher. If the watcher doesn’t detect the index.js and you’re referencing it by the folder name.
Safe write feature in editors like Vim and IntelliJ currently breaks the watcher. You will need to disable it.
Due to Webpack watcher bug, projects with path contains parentheses causes issue, try moving the project to a path without them. .
To allow more watchers in Linux and macOS, you might need to tweak system settings.
If the project runs inside a virtual machine such as (a Vagrant provisioned) VirtualBox, create an .env file in your project directory if it doesn’t exist, and add CHOKIDAR_USEPOLLING=true to it. This ensures that the next time you run npm start, the watcher uses the polling mode, as necessary inside a VM.
Could try increasing max_users_watches- link
More references:
Issue Tracker 1
Troubleshooting webpack
Issue Tracker 2 - Webpack polling
Try these:
Turn off safe write in your IDE
Increase max_user_watches
Your path should not have parentheses
as last resort try to use this as your env variable:
CHOKIDAR_USEPOLLING=true npm start
Sources:
https://github.com/facebookincubator/create-react-app/issues/659
https://github.com/facebookincubator/create-react-app/issues/1049#issuecomment-261731734
I was able to make this work using:
sudo npm start
run this command
sudo -i
echo 1048576 > /proc/sys/fs/inotify/max_user_watches
exit
try deleting the node_modules folder and reinstall
by using cmd npm install
worked for me ( ubuntu 18.04.3 LTS )
In unbuntu, i basically kill all the process running on port (for react app default is :3000).
List all the process running on port 3000.
lsof -i :3000
This command will show something like this.
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
node 7429 yipl 19u IPv4 1081760 0t0 TCP localhost:3000->localhost:35762 (ESTABLISHED)
chrome 26448 yipl 177u IPv4 1080082 0t0 TCP localhost:35762->localhost:3000 (ESTABLISHED)
Now kill the process by PID.
kill -9 7429
kill -9 26488
Start your react app again.
Apparently hot module reloading only works out-of-the-box if you eject your app.
But if you haven't ejected your app, then you can follow these instructions to get it working.
Find the ReactDOM.render(...) at the top of your app, and add these lines below it:
ReactDOM.render(...);
if (module.hot) {
module.hot.accept('./App', () => {
// --- Copy-paste your usual ReactDOM.render(...) call here: --- //
ReactDOM.render(...);
});
}
The instructions linked above also show how to hot reload things outside of the component tree, such as redux reducers.
One additional case I just experience is when using multiple version of nodejs with NVM in parallel. Basically, I have two terminal windows, one run node 10.x, other on node 9.x, and Webpack watcher stops seeing change.
The solution is to bring both to the same node version
sudo npm start
i dont know more about linux, but it is probably due to firewall settings, as i have done the same in windows and there to start react dev server we need to give the access through firewall, so to do the same here we need to give it the admin permision(sudo in case of a ubuntu linux distribution).
If you start your app with a bunch of errors it seems to stop watching your files and thus will not detect your fixes to the broken files. It seems as if you need to initiate "start" with not too many/severe errors for the file watcher to work.

Need help setting up a parsoid server on Windows Server 2012 R2

I am currently trying to setup a parsoid server for our mediawiki site so I can install the Visual Editor extension. Currently I am trying to follow the instructions over at https://www.mediawiki.org/wiki/Parsoid/Developer_Setup#Windows_setup and have run into some issues. I got the parsoid repository cloned. After running npm install I ran npm test and I get a LOT of errors. It says to include the npm-debug.log in any support request however no such log file exists in my parsoid directory so unfortunately I can't share that information here.
I also thought to try configuring parsoid by following instructions here https://www.mediawiki.org/wiki/Parsoid/Setup#Configuration but I can't find anything called settings.js or localsettings.js
It should be noted I'm very new to using mediawiki and have no experience with parsoid. So after all that rambling I guess my question is, has anyone else got parsoid working on a windows server? Should I try to go the other route of using Vagrant? I'd really like to get visual editor running on our wiki but so far its been nothing but a complicated mess for me.

Cloud9 on Raspberry Pi, Unable to save files

I'm trying to get the cloud9 local server working on my Raspberry Pi(512mb model B, running raspbian).
I followed this installation guide:
http://www.slickstreamer.info/2013/02/how-to-install-cloud-9-on-raspberry-pi.html
After this installation everything appeared to be working properly, I can start the server with the following command:
~/cloud9/bin/cloud9.sh -l 0.0.0.0 -w ~/Documents/www/workspace/
when I start the server all the files in the workspace are displayed properly and I can view, duplicate, delete, and create files remotely no problem. But when I edit an existing file and try to save it remotely a little spinning wheel pops up on the tab of the file I'm saving and it continues to spin endlessly.
When I start the server a warning pops up saying: 'path.existsSync is now called fs.existsSync.' I'm not sure if that is relevant or not.
I found another thread somewhere saying that I should go through cloud9/configs/default.js and replace any instance of localhost with 0.0.0.0. I tried that, but it didn't fix my problem.
Does anyone have any suggestions about how to get cloud9 saving files properly?
Thanks in advance for your help.
There were several complains about IDE file saving hangs on cloud9 support. At the bottom of the page there is a solution you can try.
I fully removed cloud9 and node(followed these directions to remove node: Uninstall Node.JS using Linux command line?), and then did a clean install following these directions: http://www.raspberrypi.org/phpBB3/viewtopic.php?f=63&t=30265. In addition to those commands I also had to run the following:
sudo npm install formidable
sudo npm install gnu-tools
sudo npm install xmldom
after that I was able to start the cloud9 server without issue, and now I'm able to save files.
thanks for trying to help

Resources