Comments (21)
I'm guessing that running locally uses npm to pull in the ShareJS library, but demeteorizer doesn't do that and hence there is not going to be a .npm
folder where the static file is expected to be served from.
https://github.com/onmodulus/demeteorizer says you need to do npm install
on the server; did you do this prior to running?
from meteor-sharejs.
Yes it gets run by the Modulus CLI command "modulus deploy". I'll open an issue with them and keep this issue updated.
from meteor-sharejs.
It doesn't sound exactly like a modulus problem then. Maybe the issue is that all the npm modules go to one place, while, the packages/mizzao_sharejs/.npm
path is not rewritten in the code itself.
You may have to do some manual post-processing of the code to make it work. There's probably a better way to do this that does not involve using the funny path, but I haven't figured out a way yet.
from meteor-sharejs.
Hello. I'm having a similar issue after deploying to modulus.
{"line":"405","file":"webapp_server.js","message":"Error serving static file Error: ENOENT, stat '/mnt/data/2/programs/web.browser/packages/mizzao_sharejs/.npm/package/node_modules/share/webclient/ace.js'","time":{"$date":1426805272482},"level":"error"}
from meteor-sharejs.
Same exact issue here as above with modulus :(
from meteor-sharejs.
Demeteorizer relies on the meteor bundle
command to generate all of the
required assets for the packages included in a project. It looks like bundle is
not copying over the .npm
directory for some reason. :/
from meteor-sharejs.
I pushed a possible fix for this to demeteorizer, try running from the
include-npm
branch of demeteorizer and see if that works.
You can do that by installing from the repository:
$ npm install -g onmodulus/demeteorizer#include-npm
I was able to demeteorize and correctly run the demo included in this repository,
but that doesn't guarantee that it will catch all cases. Let me know if anything
fails.
For those deploying to Modulus, you'll have to install demeteorizer using the
command above then deploy from the .demeteorized
directory that is created
($ demeteorizer && cd .demeteorized && modulus deploy
)
from meteor-sharejs.
Hmmm...This did something... Led to another issue...Anyone else get this?
from meteor-sharejs.
EDIT: Apologies, the issue I mentioned above turned out to be unrelated. However, I'm still getting the same error after using the new branch of demeteorizer to upload.
{"line":"419","file":"webapp_server.js","message":"Error serving static file Error: ENOENT, stat '/mnt/app/programs/web.browser/packages/mizzao_sharejs/.npm/package/node_modules/share/webclient/ace.js'","time":{"$date":1440042759134},"level":"error"}
from meteor-sharejs.
@rubencodes what was causing the TypeError: Cannot read property 'done' of null
issue that you were seeing? I ran into that while testing some changes.
from meteor-sharejs.
I'm not entirely sure... I just followed the steps a second time and it no longer gave me that error, it just gave me the old error :(
So no idea what caused it to begin with... Now it's uploaded, it's started, it just fails with the og error whenever I do anything related to the Ace editor.
Also: Just noticed I'm running an older version of modulus, going to update to 4 and see fi that changes anything.
from meteor-sharejs.
No dice on newest modulus version, same error :/
from meteor-sharejs.
Try again from that branch, remove and update (I force pushed the changes).
$ npm rm -g demeteorizer && npm install -g onmodulus/demeteorizer#include-npm
from meteor-sharejs.
No dice :( Same issue...When I load the page I get a failed GET request to http://[my domain]/packages/mizzao_sharejs/.npm/package/node_modules/share/webclient/ace.js
from meteor-sharejs.
This is going to get weird, but bear with me.
Let's take demeteorizer out of the equation by bundling the application using
meteor build
and seeing if that works. Here are the steps to deploy to Modulus
without using demeteorizer (brace yourself!).
Bundle the app (make sure to put your *.onmodulus.net URL here):
$ meteor build --server <your-project-url>.onmodulus.net --directory .modulus-deploy --architecture os.linux.x86_64
Edit package.json to add the correct node version and main file. 🚨 This part is
super important to make sure everything runs correctly
$ cd .modulus-deploy/bundle
$ vim programs/server/package.json
With that open add the following lines somewhere within the file (within the main {}
).
"engines": { "node": "0.10.36" },
"scripts": { "start": "node ../../main" },
Finally, deploy from the .modulus-deploy/bundle
directory and include modules.
$ modulus deploy --include-modules
This method completely avoids any demeteorizer voodoo. My fingers are crossed. :)
from meteor-sharejs.
I don't know if that will always work due to the weird binary dependencies in ShareJS, but as long as you build and deploy on the same type of system (i.e. linux x64) that should be fine.
from meteor-sharejs.
Hmm...I added the lines as indicated (triple checked that they were added), but I'm getting the following:
Found package.json: ./programs/server/package.json
WARNING: Main file not specified in package.json.
WARNING: Looking for common main file names: index.js, app.js, server.js, main.js.
ERROR: No main or start script found. There is no application to run.
Should there be a "main" file in the ../../ directory from the package.json? Because all I've got is:
client packages server smart.lock
lib public smart.json
at the ../../ directory.
from meteor-sharejs.
@rubencodes the bundle should look about like this:
.
├── bundle
│ ├── README
│ ├── main.js
│ ├── programs
│ │ ├── server
│ │ │ ├── app
│ │ │ │ └── leaderboard.js
│ │ │ ├── assets
│ │ │ │ └── packages
│ │ │ │ └── boilerplate-generator
│ │ │ │ ├── boilerplate_web.browser.html
│ │ │ │ └── boilerplate_web.cordova.html
│ │ │ ├── boot-utils.js
│ │ │ ├── boot.js
│ │ │ ├── config.json
│ │ │ ├── mini-files.js
│ │ │ ├── npm
│ │ │ ├── npm-shrinkwrap.json
│ │ │ ├── package.json
│ │ │ ├── packages
│ │ │ ├── program.json
│ │ │ └── shell-server.js
│ │ ├── web.browser
│ │ │ ├── 7f34d936fe9105bb301647e4132ec8c80f148a96.js
│ │ │ ├── e60597c923303d5681465135816d98a110781aae.css
│ │ │ ├── head.html
│ │ │ └── program.json
│ │ └── web.cordova
│ │ ├── aadf8805f63511af904f07b3b76b654a6c33aae3.js
│ │ ├── e60597c923303d5681465135816d98a110781aae.css
│ │ ├── head.html
│ │ └── program.json
│ ├── server
│ └── star.json
└── ios
from meteor-sharejs.
Alright, I got the directions just a little wrong, change the start
section to "scripts": { "start": "node ../../main" },
Sorry about that!
from meteor-sharejs.
IT LIVES!!! Thank you! This worked perfectly! So is this just some sort of issue with demeteorizer?
from meteor-sharejs.
Yeah, demeteorizer uses the old bundle
command over build
, which seems to
have an impact on the structure of the output.
I've started the effort of rewriting demeteorizer to use build
, but it will
take some time to get there. I suggest using this manual method for now.
from meteor-sharejs.
Related Issues (20)
- ReferenceError: Cannot access 'ShareJS' before initialization HOT 2
- Editor permissions HOT 4
- ShareJS object not exported? HOT 2
- Multiple Ace Editor IDs HOT 2
- mizzao:[email protected] causes app to crash HOT 1
- broken with multiple app instances? HOT 1
- Uncaught Error: Cannot find module 'share/node_modules/browserchannel/dist/bcsocket-uncompressed' HOT 1
- Failed to get ops HOT 39
- Update CodeMirror? HOT 2
- Still Active? HOT 2
- Need to declare use of ecmascript HOT 3
- Update to codemirror 5.25.0
- ShareJS.model.on('applyOp',... causes textarea to lose focus HOT 1
- Alternative package for ShareDB and Meteor HOT 1
- Saving editor content to database HOT 1
- how to sync share js to the local file when something change on the server
- No compatible binary build found for mizzao:[email protected] HOT 1
- ShareJS not defined in Meteor 1.6 HOT 10
- Document was opened but closed right away
- does not save document HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from meteor-sharejs.