Rebelizer / pellet

Isomorphic framework using react, nodejs, and love
http://pellet.io
MIT License
91 stars 9 forks source link

Error running project #25

Open morenoh149 opened 9 years ago

morenoh149 commented 9 years ago

I get the following after running the project a second time (this first time I navigate to localhost:8080 and get Not found page)

➜  pelletTest  pellet run --build

            _ _      _                ,;:;;,
 ____   ___| | | ___| |_             ;;;;;
|  _ \ / _ \ | |/ _ \ __|    .=',    ;:;;:,
| |_) |  __/ | |  __/ |_    /_', "=. ';:;:;
|  __/ \___|_|_|\___|\__|   @=:__,  \\,;:;:'
|_|ReactJS favorite buddy     _(\\.=  ;:;;'
                             `"_(  _/="`

Version: 0.0.100
2015-06-19T02:31:14.315Z - info: [pellet] Loading and merge /Users/harrymoreno/npm/lib/node_modules/pellet/src/components/core.manifest.json
2015-06-19T02:31:14.317Z - info: [pellet] Loading and merge /Users/harrymoreno/programming/js/pelletTest/pelletTest/manifest.json
2015-06-19T02:31:14.323Z - info: [pellet] Use http://webpack.github.io/analyse/ with _PROFILE_*.json in build dir for deep understanding
2015-06-19T02:31:14.323Z - info: [pellet] Webpack entry points:
  component
    /Users/harrymoreno/npm/lib/node_modules/pellet/src/components/internationalization/internationalization.jsx
    /Users/harrymoreno/npm/lib/node_modules/pellet/src/components/multivariate-testing/dashboard/abn-dashboard.js
    /Users/harrymoreno/programming/js/pelletTest/pelletTest/frontend/index.js
  assets
    /Users/harrymoreno/npm/lib/node_modules/pellet/src/components/internationalization/internationalization.styl
  server-dependencies
    /Users/harrymoreno/npm/lib/node_modules/pellet/src/render-skeleton.js
    /Users/harrymoreno/npm/lib/node_modules/pellet/src/components/user-agent-middleware.js
    /Users/harrymoreno/npm/lib/node_modules/pellet/src/components/multivariate-testing/ga-experiment-middleware.js
  client-dependencies
    /Users/harrymoreno/npm/lib/node_modules/pellet/src/components/console-polyfill.js
    /Users/harrymoreno/npm/lib/node_modules/pellet/src/instrumentation/google-analytics.js
    /Users/harrymoreno/npm/lib/node_modules/pellet/src/instrumentation/local.js
  code
    /Users/harrymoreno/npm/lib/node_modules/pellet/src/isomorphic/route.js
    /Users/harrymoreno/npm/lib/node_modules/pellet/src/instrumentation.js
    /Users/harrymoreno/npm/lib/node_modules/pellet/src/components/multivariate-testing/ga-experiment.js
    /Users/harrymoreno/npm/lib/node_modules/pellet/src/components/user-agent-mixin.js
2015-06-19T02:31:14.336Z - info: [pellet] Translations Breakdown:
  en-US 2
  fr 1
  ja 1
2015-06-19T02:31:14.391Z - error: [pellet] Error in webpack passes (browser|server) because: Cannot parse records: Unexpected token e

this is a vanilla install as far as I can tell

ghost commented 9 years ago

HI,

Can you try running "pellet run --build --clean" sometimes webpack will cache build steps. The clean flag will remove temp build files.

morenoh149 commented 9 years ago
➜  pelletTest  pellet run --build --clean

            _ _      _                ,;:;;,
 ____   ___| | | ___| |_             ;;;;;
|  _ \ / _ \ | |/ _ \ __|    .=',    ;:;;:,
| |_) |  __/ | |  __/ |_    /_', "=. ';:;:;
|  __/ \___|_|_|\___|\__|   @=:__,  \\,;:;:'
|_|ReactJS favorite buddy     _(\\.=  ;:;;'
                             `"_(  _/="`

Version: 0.0.100
2015-06-22T19:06:13.744Z - error: [alert] Stack Trace:

TypeError: glob pattern string required
    at new Minimatch (/Users/harrymoreno/npm/lib/node_modules/pellet/node_modules/glob/node_modules/minimatch/minimatch.js:108:11)
    at setopts (/Users/harrymoreno/npm/lib/node_modules/pellet/node_modules/glob/common.js:123:20)
    at new Glob (/Users/harrymoreno/npm/lib/node_modules/pellet/node_modules/glob/glob.js:116:3)
    at glob (/Users/harrymoreno/npm/lib/node_modules/pellet/node_modules/glob/glob.js:73:10)
    at /Users/harrymoreno/npm/lib/node_modules/pellet/src/manifest.js:333:5
    at /Users/harrymoreno/npm/lib/node_modules/pellet/node_modules/async/lib/async.js:122:13
    at _each (/Users/harrymoreno/npm/lib/node_modules/pellet/node_modules/async/lib/async.js:46:13)
    at Object.async.each (/Users/harrymoreno/npm/lib/node_modules/pellet/node_modules/async/lib/async.js:121:9)
    at manifestParser.buildWebpackConfig (/Users/harrymoreno/npm/lib/node_modules/pellet/src/manifest.js:332:9)
    at buildRunPackage (/Users/harrymoreno/npm/lib/node_modules/pellet/bin/commands/cmd-server.js:843:21)
    at Array.<anonymous> (/Users/harrymoreno/npm/lib/node_modules/pellet/bin/commands/cmd-server.js:1095:7)
    at Object.<anonymous> (/Users/harrymoreno/npm/lib/node_modules/pellet/bin/pellet.js:181:14)
    at Module._compile (module.js:431:26)
    at Object.Module._extensions..js (module.js:449:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:311:12)
ghost commented 9 years ago

Hi Harry,

Are you your running this command inside the seed project. for example: $ cd /tmp/ $ mkdir myproj $ cd /tmp/myproj $ pellet init $ pellet run --build --clean

This error looks like pellet can not find the manifest file. Pellet starts looking for the file in the current working dir and walk up to / looking for a manifest.json file. If you are in the project then do you mind listing the dir tree. for example, find . -print.

thanks again for all your help! We will get this working :)

morenoh149 commented 9 years ago

apologies

➜  pelletTest  pellet run --build --clean

            _ _      _                ,;:;;,
 ____   ___| | | ___| |_             ;;;;;
|  _ \ / _ \ | |/ _ \ __|    .=',    ;:;;:,
| |_) |  __/ | |  __/ |_    /_', "=. ';:;:;
|  __/ \___|_|_|\___|\__|   @=:__,  \\,;:;:'
|_|ReactJS favorite buddy     _(\\.=  ;:;;'
                             `"_(  _/="`

Version: 0.0.100
2015-06-22T21:21:31.978Z - info: [pellet] Loading and merge /Users/harrymoreno/npm/lib/node_modules/pellet/src/components/core.manifest.json
2015-06-22T21:21:31.980Z - info: [pellet] Loading and merge /Users/harrymoreno/programming/js/pelletTest/pelletTest/manifest.json
2015-06-22T21:21:31.986Z - info: [pellet] Use http://webpack.github.io/analyse/ with _PROFILE_*.json in build dir for deep understanding
2015-06-22T21:21:31.987Z - info: [pellet] Webpack entry points:
  component
    /Users/harrymoreno/npm/lib/node_modules/pellet/src/components/internationalization/internationalization.jsx
    /Users/harrymoreno/npm/lib/node_modules/pellet/src/components/multivariate-testing/dashboard/abn-dashboard.js
    /Users/harrymoreno/programming/js/pelletTest/pelletTest/frontend/index.js
  assets
    /Users/harrymoreno/npm/lib/node_modules/pellet/src/components/internationalization/internationalization.styl
  server-dependencies
    /Users/harrymoreno/npm/lib/node_modules/pellet/src/components/user-agent-middleware.js
    /Users/harrymoreno/npm/lib/node_modules/pellet/src/render-skeleton.js
    /Users/harrymoreno/npm/lib/node_modules/pellet/src/components/multivariate-testing/ga-experiment-middleware.js
  client-dependencies
    /Users/harrymoreno/npm/lib/node_modules/pellet/src/components/console-polyfill.js
    /Users/harrymoreno/npm/lib/node_modules/pellet/src/instrumentation/google-analytics.js
    /Users/harrymoreno/npm/lib/node_modules/pellet/src/instrumentation/local.js
  code
    /Users/harrymoreno/npm/lib/node_modules/pellet/src/instrumentation.js
    /Users/harrymoreno/npm/lib/node_modules/pellet/src/components/multivariate-testing/ga-experiment.js
    /Users/harrymoreno/npm/lib/node_modules/pellet/src/components/user-agent-mixin.js
    /Users/harrymoreno/npm/lib/node_modules/pellet/src/isomorphic/route.js
2015-06-22T21:21:32.013Z - info: [pellet] Translations Breakdown:
  en-US 2
  fr 1
  ja 1
build [============================= ] 95%2015-06-22T21:21:36.628Z - info: [pellet] Server Pack -------------------------
2015-06-22T21:21:36.629Z - info: [pellet] Hash: d7d9db5e
Version: webpack 1.4.15
Time: 4521ms
       Asset     Size  Chunks             Chunk Names
   assets.js    26430       0  [emitted]  assets
component.js  2693406       1  [emitted]  component

build [==============================] 100%2015-06-22T21:21:36.630Z - info: [pellet]
2015-06-22T21:21:36.635Z - info: [pellet] Browser Pack -------------------------
2015-06-22T21:21:36.635Z - info: [pellet] Hash: bc564bde
Version: webpack 1.4.15
Time: 4549ms
         Asset    Size  Chunks             Chunk Names
     assets.js   26425       0  [emitted]  assets
_style_styl.js   23230       1  [emitted]  _style_styl
  component.js  503022       2  [emitted]  component

2015-06-22T21:21:36.635Z - info: [pellet] Isomorphic packing in done
2015-06-22T21:21:37.199Z - info: [pellet] Listen on 8080 0.0.0.0

at localhost:8080 I get a blank page that says Not Found

ghost commented 9 years ago

No worries :)

Do you mind letting me see frontend/index.js or try going to http://127.0.0.1:8080/index I just want to see if you have a routes entry.

Also if you can paste me the markup that is sent to the browser that would be helpful.

thanks again

morenoh149 commented 9 years ago
// frontend/index.js
var React = require("react")
  , indexJade = require('./index.jade')
  , pellet = require("pellet");

module.exports = indexPage = pellet.createClass({
  /*
  componentConstruction: function(options, next) {
    this.set({val:'val'}); // serialized to the broswer from the server render
    this.setProps({val:'val'}); // set props passed to getInitialState

    next();
  },
  getInitialState: function() {
    return {};
  },
  componentWillMount: function() {
  },
  componentDidMount: function(nextProps) {
  },
  componentWillReceiveProps: function(nextProps) {
  },
  shouldComponentUpdate: function(nextProps, nextState) {
  },
  componentWillUpdate: function(nextProps, nextState) {
  },
  componentDidUpdate: function(prevProps, prevState) {
  },
  componentWillUnmount: function(nextProps, nextState) {
  },
  */

// layoutTemplate: "{name_of_your_layout_in_the_manifest}",

  routes: ["/", "/index"],

  render: function() {
    return indexJade(this);
  }
});

What I get in my chrome browser at the root and /index

<html>
<script type="text/javascript" src="chrome-extension://iigcccneenmnplhhfhaeahiofeeeifpn/scripts/cordova.js"></script>
<head></head>
<body cz-shortcut-listen="true">
<pre style="word-wrap: break-word; white-space: pre-wrap;">Not Found</pre>
</body>
</html>
ghost commented 9 years ago

Are you trying to run this in phonegap/cordove? If so, you need todo a few things differently. I am working on a wrapper to help with this. If you want I can try to finish up the wrapper for you after work.

morenoh149 commented 9 years ago

not at all that's just my chrome extension or some other tool I use for cordova development. The pellet tool on npm doesn't work out of the box on my machine.