0

When I build my Meteor application, it is not creating valid js or css files. This happens both when I do meteor run ios and meteor build ~/builddir --server=http://app.myserver.com:80/

The snippet below contains the actual CSS, JS and HTML files in respective order. The html is not even properly formatted, which seems super weird to me. Am I missing something completely obvious?

An interesting thing to note is that the names of the files do not seem to change. What I mean is that is the css file is always named 68656e12cb5647ccd9e1ca30f039055f336a08d2.css and the js file is always named 83f43fb0b048a87151b782ce0ae04a95ecbae2e7.js.

I did a find . | grep js and a find . | grep css to try and find these files but I'm pretty sure that they don't exist.

Here is my package list:

ground:db                 0.3.9* Ground Meteor.Collections offline
iron:router               1.0.9  Routing specifically designed for Meteor
meteor-platform           1.2.2  Include a standard set of Meteor packages in your app
momentjs:moment           2.10.3  Moment.js (official): parse, validate, manipulate, and display dates - official Meteor packaging
mrt:fittext               1.2.0  FitText packaged for Meteor.
pauloborges:mapbox        2.1.4_3  Mapbox.js for Meteor apps
reactive-var              1.0.5  Reactive variable
u2622:persistent-session  0.3.5  Persistently store Session data on the client

<!DOCTYPE html >
< html >
< head >
< meta charset = "utf-8" >
< meta name = "format-detection" content = "telephone=no" >
< meta name = "viewport" content = "user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height" >
< meta name = "msapplication-tap-highlight" content = "no" >
< link rel = "stylesheet" type = "text/css" class = "__meteor-css__" href = "/68656e12cb5647ccd9e1ca30f039055f336a08d2.css?meteor_css_resource=true" >
< script type = "text/javascript" >
__meteor_runtime_config__ = JSON.parse(decodeURIComponent("%7B%22meteorRelease%22%3A%22METEOR%401.1.0.2%22%2C%22PUBLIC_SETTINGS%22%3A%7B%22othersetting%22%3A%22anothervalue%22%7D%2C%22ROOT_URL%22%3A%22http%3A%2F%2Fnbt.otterhive.com%2F%22%2C%22ROOT_URL_PATH_PREFIX%22%3A%22%22%2C%22autoupdateVersion%22%3A%22bcf325756930a7028774c23bd28b4cc053de29ba%22%2C%22autoupdateVersionRefreshable%22%3A%22393b25460d4096237fe166edc70a833659c1d58b%22%2C%22autoupdateVersionCordova%22%3A%227c4f521c660011a4692d147b69dc64a13f578719%22%2C%22DDP_DEFAULT_CONNECTION_URL%22%3A%22http%3A%2F%2Fnbt.otterhive.com%2F%22%7D"));

if (/Android/i.test(navigator.userAgent)) {
    // When Android app is emulated, it cannot connect to localhost,
    // instead it should connect to 10.0.2.2
    // (unless we're using an http proxy; then it works!)
    if (!__meteor_runtime_config__.httpProxyPort) {
        __meteor_runtime_config__.ROOT_URL = (__meteor_runtime_config__.ROOT_URL || '').replace(/localhost/i, '10.0.2.2');
        __meteor_runtime_config__.DDP_DEFAULT_CONNECTION_URL = (__meteor_runtime_config__.DDP_DEFAULT_CONNECTION_URL || '').replace(/localhost/i, '10.0.2.2');
    }
}
< /script>
< script type = "text/javascript" src = "/cordova.js"></script>
< script type = "text/javascript" src = "/83f43fb0b048a87151b782ce0ae04a95ecbae2e7.js"></script>

< meta charset = "utf-8" >
< meta http - equiv = "X-UA-Compatible" content = "IE=edge" >
< meta name = "viewport" content = "width=device-width, initial-scale=1.0" >
< title > Nature Based Therapeutics < /title>
< /head>
< body >

< /body>
< /html>
< !DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="format-detection" content="telephone=no">
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height">
<meta name="msapplication-tap-highlight" content="no">
<link rel="stylesheet" type="text/css" class="__meteor-css__" href="/68656e12cb5647ccd9e1ca30f039055f336a08d2.css?meteor_css_resource=true">
<script type="text/javascript">
__meteor_runtime_config__ = JSON.parse(decodeURIComponent("%7B%22meteorRelease%22%3A%22METEOR%401.1.0.2%22%2C%22PUBLIC_SETTINGS%22%3A%7B%22othersetting%22%3A%22anothervalue%22%7D%2C%22ROOT_URL%22%3A%22http%3A%2F%2Fnbt.otterhive.com%2F%22%2C%22ROOT_URL_PATH_PREFIX%22%3A%22%22%2C%22autoupdateVersion%22%3A%22bcf325756930a7028774c23bd28b4cc053de29ba%22%2C%22autoupdateVersionRefreshable%22%3A%22393b25460d4096237fe166edc70a833659c1d58b%22%2C%22autoupdateVersionCordova%22%3A%227c4f521c660011a4692d147b69dc64a13f578719%22%2C%22DDP_DEFAULT_CONNECTION_URL%22%3A%22http%3A%2F%2Fnbt.otterhive.com%2F%22%7D"));

if (/Android/i.test(navigator.userAgent)) {
    // When Android app is emulated, it cannot connect to localhost,
    // instead it should connect to 10.0.2.2
    // (unless we're using an http proxy; then it works!)
    if ( !__meteor_runtime_config__.httpProxyPort) {
        __meteor_runtime_config__.ROOT_URL = (__meteor_runtime_config__.ROOT_URL || '').replace(/localhost/i, '10.0.2.2');
        __meteor_runtime_config__.DDP_DEFAULT_CONNECTION_URL = (__meteor_runtime_config__.DDP_DEFAULT_CONNECTION_URL || '').replace(/localhost/i, '10.0.2.2');
    }
}

</script>
<script type="text/javascript" src="/cordova.js"></script>
<script type="text/javascript" src="/83f43fb0b048a87151b782ce0ae04a95ecbae2e7.js"></script>

<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Nature Based Therapeutics</title>
</head>
<body>

</body>
</html>
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="format-detection" content="telephone=no">
  <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height">
  <meta name="msapplication-tap-highlight" content="no">

  <link rel="stylesheet" type="text/css" class="__meteor-css__" href="/68656e12cb5647ccd9e1ca30f039055f336a08d2.css?meteor_css_resource=true">

  <script type="text/javascript">
    __meteor_runtime_config__ = JSON.parse(decodeURIComponent("%7B%22meteorRelease%22%3A%22METEOR%401.1.0.2%22%2C%22PUBLIC_SETTINGS%22%3A%7B%22othersetting%22%3A%22anothervalue%22%7D%2C%22ROOT_URL%22%3A%22http%3A%2F%2Fnbt.otterhive.com%2F%22%2C%22ROOT_URL_PATH_PREFIX%22%3A%22%22%2C%22autoupdateVersion%22%3A%22bcf325756930a7028774c23bd28b4cc053de29ba%22%2C%22autoupdateVersionRefreshable%22%3A%22393b25460d4096237fe166edc70a833659c1d58b%22%2C%22autoupdateVersionCordova%22%3A%227c4f521c660011a4692d147b69dc64a13f578719%22%2C%22DDP_DEFAULT_CONNECTION_URL%22%3A%22http%3A%2F%2Fnbt.otterhive.com%2F%22%7D"));

    if (/Android/i.test(navigator.userAgent)) {
      // When Android app is emulated, it cannot connect to localhost,
      // instead it should connect to 10.0.2.2
      // (unless we're using an http proxy; then it works!)
      if (!__meteor_runtime_config__.httpProxyPort) {
        __meteor_runtime_config__.ROOT_URL = (__meteor_runtime_config__.ROOT_URL || '').replace(/localhost/i, '10.0.2.2');
        __meteor_runtime_config__.DDP_DEFAULT_CONNECTION_URL = (__meteor_runtime_config__.DDP_DEFAULT_CONNECTION_URL || '').replace(/localhost/i, '10.0.2.2');
      }
    }
  </script>

  <script type="text/javascript" src="/cordova.js"></script>
  <script type="text/javascript" src="/83f43fb0b048a87151b782ce0ae04a95ecbae2e7.js"></script>


  <meta charset="utf-8">
 <meta http-equiv="X-UA-Compatible" content="IE=edge">
 <meta name="viewport" content="width=device-width, initial-scale=1.0">
 <title>Nature Based Therapeutics</title>
</head>

<body>
  
</body>
</html>
soren468
  • 319
  • 1
  • 6

2 Answers2

0

When you use meteor build it will create a tarred bundle containing a node application.

The css and js files are minified and concatenated.

If you untar the bundled tar.gz files you will find the css, js and other static files in bundle/programs/web.browser

Keep in mind the output is an application not a set of files that are intended to be edited.

If you want to edit the files use your project, not the files created by meteor build.

Tarang
  • 75,157
  • 39
  • 215
  • 276
  • I'm not trying to edit the files. When I build the project, the index.html file has a link to the css file and script tag to the js file I mentioned (which is the minified and concatenated concatenated version. I have inspected these with Safari's inspector. When I follow the links and look at the files they are this weird broken version of the index.html file. Furthermore, the files that are referenced in index.html exist absolutely nowhere in the project or the build results. – soren468 Jul 12 '15 at 21:17
0

So I got it to work, but I would still really like to know what is happening. That was my original question after all. If any one knows what's going on here, please let me know.

I manually deleted the application and reinstalled it. That worked for me. My guess is that old versions of the files were cached for some reason.

soren468
  • 319
  • 1
  • 6