GithubHelp home page GithubHelp logo

Comments (20)

tomchentw avatar tomchentw commented on June 25, 2024

I believe you didn't type npm i in the root of the repo, right?

Never mind, I fixed the webpack.config.js to resolve it here so you just need to type npm i and npm run dev inside examples/gh-pages.

Please let me know if it works, thanks!

from react-google-maps.

mrpintcom avatar mrpintcom commented on June 25, 2024

Thanks for the fast reply, unfortunately it's still not working.

The webpack compiles until if fails with this error:

TypeError: tmp/server.js
--------------------------------------------------------------------------------options must be an object
    at TypeError (native)
    at Object.exports.createScript (vm.js:44:10)
    at module.exports (/Users/lukepint/workspace/boomplans/examples/gh-pages/node_modules/eval/eval.js:55:8)
    at IsomorphicReactPluginFactory.evaluate (/Users/lukepint/workspace/boomplans/examples/gh-pages/IsomorphicReactPluginFactory.js:56:12)
    at IsomorphicReactPluginFactory.runCompilation (/Users/lukepint/workspace/boomplans/examples/gh-pages/IsomorphicReactPluginFactory.js:68:32)
    at IsomorphicReactPluginFactory.receivedClientAssets (/Users/lukepint/workspace/boomplans/examples/gh-pages/IsomorphicReactPluginFactory.js:33:10)
    at ClientPlugin.<anonymous> (/Users/lukepint/workspace/boomplans/examples/gh-pages/IsomorphicReactPluginFactory.js:97:24)
    at Tapable.applyPluginsAsync (/Users/lukepint/workspace/boomplans/examples/gh-pages/node_modules/webpack/node_modules/tapable/lib/Tapable.js:71:13)
    at Tapable.Compiler.emitAssets (/Users/lukepint/workspace/boomplans/examples/gh-pages/node_modules/webpack/lib/Compiler.js:216:7)
    at Watching.<anonymous> (/Users/lukepint/workspace/boomplans/examples/gh-pages/node_modules/webpack/lib/Compiler.js:45:18)
--------------------------------------------------------------------------------

So it seems to be something not compiling right. I'm running on Mac OSX 10.10.1 but wouldn't think that should matter.

I actually tried cloning installing and running on 2 Macs and they fail at the same spot.

from react-google-maps.

mrpintcom avatar mrpintcom commented on June 25, 2024

Here's a gist of what's happening:

https://gist.github.com/lapint/3ed3ea184bfdf0def81a

from react-google-maps.

mrpintcom avatar mrpintcom commented on June 25, 2024

I was able to find a working version here:

react-google-maps lukepint$ git checkout 338234a0545f9c7f7de79d5fe1a5b65540265c44
HEAD is now at 338234a... Merge pull request #37 from tomchentw/chore-update-dev-deps

from react-google-maps.

idolize avatar idolize commented on June 25, 2024

Likewise seeing this error when building the example pages.

npm ERR! code ELIFECYCLE
npm ERR! [email protected] build_client: npm run clean && webpack -p
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build_client script 'npm run clean && webpack -p'.
npm ERR! This is most likely a problem with the gh-pages package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! npm run clean && webpack -p

(This is on a fresh clone/install)

from react-google-maps.

mrpintcom avatar mrpintcom commented on June 25, 2024

I'm wondering if this is an issue with what version of node is being used server side.

Running this version:
git checkout 931aaab

Causes "npm run dev" to fail and it is when the app was converted to an isometric one.

Looks like it's coming from eval.createScript() not being able to parse the content being passed into it maybe.

from react-google-maps.

idolize avatar idolize commented on June 25, 2024

I don't know much about Webpack (I use Browserify)... Is there even a server involved when running just webpack -p (not webpack-dev-server)? Because that fails for me as well.

from react-google-maps.

mrpintcom avatar mrpintcom commented on June 25, 2024

webpack-dev-server still uses webpack, it just starts up a dev server for it as well.

The problem is that IsomorphicReactPluginFactory.js compiles all the required js into a component and then uses React.renderToString(ServerComponent) to render the client side from the server component.

I think eval could be the culprit, but not exactly sure how to fix it at this point.

from react-google-maps.

mrpintcom avatar mrpintcom commented on June 25, 2024

I was able to fix the issue on master, I changed line 56 of IsomorphicReactPluginFactory.js
from: return evaluate(source, includeGlobals);
to: return eval(source, includeGlobals);

It's not the best since it uses javascript eval but it allows the server to start.

from react-google-maps.

tomchentw avatar tomchentw commented on June 25, 2024

Sorry I missed the thread, I'm considering this issue might be related to versioning issues of node and npm. I'm running on node: v0.10.38 and npm 2.7.5

from react-google-maps.

tomchentw avatar tomchentw commented on June 25, 2024

Got the same error today at [email protected]

options must be an object

from react-google-maps.

tomchentw avatar tomchentw commented on June 25, 2024

Thanks @lapint for spotting eval might be the issue. I guess it's due to old API used for [email protected] but it's incompatible with [email protected].
Switch to a new module called eval-as-module solve this problem.

from react-google-maps.

urban avatar urban commented on June 25, 2024

I'd like to contribute to this project with however I'm running into the following error even in [email protected] when running npm run dev.

ERROR in ./~/react-toastr/lib/ToastMessage/jQueryMixin.js
Module not found: Error: Cannot resolve module 'jquery' in

Any quick solutions to fix this or remove the dependency?

from react-google-maps.

tomchentw avatar tomchentw commented on June 25, 2024

@urban hmm in latest master branch, jQuery is included as devDependencies. Could you check your node_modules if it exists?

from react-google-maps.

urban avatar urban commented on June 25, 2024

@tomchentw Yes, you are right. When I wrote my earlier post, I didn't realize I was in your chore-node-012-compatibility branch, which is a WIP and not the master branch. Sorry for the inconvenience.

from react-google-maps.

tomchentw avatar tomchentw commented on June 25, 2024

No worries @urban ! Glad it works now.

from react-google-maps.

idolize avatar idolize commented on June 25, 2024

Still having issues building the docs on the latest version and on multiple computers.

npm ERR! argv "node" "/usr/local/bin/npm" "run" "dev"
npm ERR! node v0.12.2
npm ERR! npm  v2.7.5
npm ERR! code ELIFECYCLE
npm ERR! [email protected] dev: `cd examples/gh-pages && npm i && npm run dev`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] dev script 'cd examples/gh-pages && npm i && npm run dev'.
npm ERR! This is most likely a problem with the react-google-maps package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     cd examples/gh-pages && npm i && npm run dev
npm ERR! You can get their info via:
npm ERR!     npm owner ls react-google-maps
npm ERR! There is likely additional logging output above.

from react-google-maps.

sanjaydev avatar sanjaydev commented on June 25, 2024

0 info it worked if it ends with ok
1 verbose cli [ 'c:\Program Files\nodejs\node.exe',
1 verbose cli 'c:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js',
1 verbose cli 'start' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info prestart [email protected]
6 info start [email protected]
7 verbose unsafe-perm in lifecycle true
8 info [email protected] Failed to exec start script
9 verbose stack Error: [email protected] start: webpack-dev-server --hot
9 verbose stack Exit status 1
9 verbose stack at EventEmitter. (c:\Program Files\nodejs\node_modules\npm\lib\utils\lifecycle.js:213:16)
9 verbose stack at EventEmitter.emit (events.js:110:17)
9 verbose stack at ChildProcess. (c:\Program Files\nodejs\node_modules\npm\lib\utils\spawn.js:24:14)
9 verbose stack at ChildProcess.emit (events.js:110:17)
9 verbose stack at maybeClose (child_process.js:1015:16)
9 verbose stack at Process.ChildProcess._handle.onexit (child_process.js:1087:5)
10 verbose pkgid [email protected]
11 verbose cwd c:\D-DRIVE-DATA\React\React-Modules
12 error Windows_NT 6.3.9600
13 error argv "c:\Program Files\nodejs\node.exe" "c:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "start"
14 error node v0.12.5
15 error npm v2.11.2
16 error code ELIFECYCLE
17 error [email protected] start: webpack-dev-server --hot
17 error Exit status 1
18 error Failed at the [email protected] start script 'webpack-dev-server --hot'.
18 error This is most likely a problem with the reactmodules package,
18 error not with npm itself.
18 error Tell the author that this fails on your system:
18 error webpack-dev-server --hot
18 error You can get their info via:
18 error npm owner ls reactmodules
18 error There is likely additional logging output above.
19 verbose exit [ 1, true ]

getting error while running npm start command

from react-google-maps.

sanjaydev avatar sanjaydev commented on June 25, 2024

I have added

"scripts": {
"start": "webpack-dev-server --hot"
},

to start webpack

from react-google-maps.

datctbk avatar datctbk commented on June 25, 2024

@tomchentw
it works! thanks

from react-google-maps.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.