Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

material-ui-leaderboard : Update to release [email protected] is impossible: #111

Closed
lc3t35 opened this issue Sep 22, 2015 · 11 comments
Closed
Labels

Comments

@lc3t35
Copy link

lc3t35 commented Sep 22, 2015

Update to release [email protected] is impossible:
While reading package from `/Users/laurent/dev/meteor/react-packages/examples/material-ui-leaderboard/packages/npm-container`:
package.js:23:7: The `isAsset` option to `addFiles` is deprecated. Use PackageAPI#addAssets instead.

This project is at the latest release which is compatible with your current package constraints.
=> Errors while upgrading packages:           

While reading package from `/Users/laurent/dev/meteor/react-packages/examples/material-ui-leaderboard/packages/npm-container`:
package.js:23:7: The `isAsset` option to `addFiles` is deprecated. Use PackageAPI#addAssets instead.

npm-container/package.js should be modified to allow meteor update in material-ui-leaderboard example :

Package.onUse(function(api) {
  api.add_files('index.js', 'server');
  api.addAssets('../../packages.json', 'server');
});
@stubailo stubailo added the bug label Sep 22, 2015
@elie222
Copy link

elie222 commented Sep 23, 2015

I had a similar problem and this fixed it for me:

From https://forums.meteor.com/t/public-release-candidate-of-meteor-1-2/8986/77

If anyone having issues with meteorhacks:npm. Follow these steps:

rm -rf packages/npm-container
meteor remove npm-container
meteor update meteorhacks:npm
meteor
Read More: https://github.com/meteorhacks/npm/issues/95#issuecomment-1376135579

@jonas28
Copy link

jonas28 commented Sep 23, 2015

I have the same problem as @lc3t35. The solution of @elie222 didn´t work for me. After trying it, i got the following message:

=> Started MongoDB.                           
npm-container: updating npm dependencies -- material-ui, externalify, react-tap-event-plugin...
=> Errors prevented startup:                  

   While building package npm-container:
   error: couldn't run `npm shrinkwrap`: Command failed: npm ERR! Error: Problems were encountered
   ...

@rogchap
Copy link

rogchap commented Sep 26, 2015

Also trying to update my react/meteor app to 1.2 so I've tried to build the material-ui example here but getting this error after updating to 1.2:

While building package npm-container:
error: couldn't install npm package [email protected]: Command failed: npm ERR! peerinvalid The package react does not satisfy its
siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer [email protected] wants react@>=0.13
npm ERR! peerinvalid Peer [email protected] wants react@^0.14.0-0

@payner35
Copy link

@rogchap this has now been fixed with the update to

"material-ui": "0.12.0",

mui/material-ui#1714

@payner35
Copy link

i now have

   building package npm-container:
   error: couldn't run `npm shrinkwrap`: Command failed: npm ERR! Error: Problems were encountered
   npm ERR! Please correct and try again.
   npm ERR! extraneous: [email protected] /....... packages/npm-container/.npm/package-new-zm4itw/node_modules/fbjs
   npm ERR! extraneous: [email protected]

@rogchap
Copy link

rogchap commented Sep 28, 2015

@payner35 I don't think this is specific to material-ul, but rather the peerDependencies that are present in packages.
The fix you mention is to do with the dependency within react-tap-event-plugin for react v0.14+ (which is not released yet)

In Meteor react is loaded via a meteor package, where normally react would be loaded via npm, therefore when we install a react npm package it can't find the dependency on react.

I did get this working by adding react to my packages.json file, and then use externalify to select the Meteor loaded version of react.

Doing this though, means react is "downloaded" twice... not so good.

@stubailo
Copy link
Contributor

Updated the example apps to Meteor 1.2.0.2!

@rkstar
Copy link

rkstar commented Sep 29, 2015

i'm trying to get v0.12.1 to work with meteor 1.2.0.2, but i'm getting package errors, then peerdependencies errors, and now styling errors...

can someone please explain this with some code? i'm getting errors all over and i can't seem to figure out wtf i'm doing wrong here:

packages.json:

 {
 "externalify": "0.1.0",
  "material-ui": "0.12.1",
  "react": "0.14.0-rc1"
}

browserify.options.json

{
  "transforms": {
    "externalify": {
      "global": true,
      "external": {
        "react": "Package['react-runtime'].React.require"
      }
    }
  }
}

browserify.js

injectTapEventPlugin = require("react-tap-event-plugin")
// Needed for onTouchTap
injectTapEventPlugin()
React.initializeTouchEvents(true)

// material ui
mui = require('material-ui')

ThemeManager = new mui.Styles.ThemeManager()
ThemeManager.setTheme(ThemeManager.types.LIGHT)

i know that my ThemeManager setup is wrong...* but i can't figure out from the MUI docs how to make this work with meteor. @stubailo are the example apps working with material-ui 0.12.1 ?


current error:

=> Your application has errors. Waiting for file change.
=> Modified -- restarting.                    

events.js:72
        throw er; // Unhandled 'error' event
              ^
SyntaxError: Unexpected token (4:62) while parsing /Users/rkstar/dev/projects/wacoosta/packages/npm-container/.npm/package/node_modules/material-ui/lib/app-canvas.js while parsing file: /Users/rkstar/dev/projects/wacoosta/packages/npm-container/.npm/package/node_modules/material-ui/lib/app-canvas.js
  at DestroyableTransform.end [as _flush] (/Users/rkstar/.meteor/packages/cosmos_browserify/.0.7.0.1pwzdl1++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/insert-module-globals/index.js:79:21)
  at DestroyableTransform.<anonymous> (/Users/rkstar/.meteor/packages/cosmos_browserify/.0.7.0.1pwzdl1++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:135:12)
  at DestroyableTransform.g (events.js:180:16)
  at DestroyableTransform.emit (events.js:92:17)
  at prefinish (/Users/rkstar/.meteor/packages/cosmos_browserify/.0.7.0.1pwzdl1++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:450:12)
  at finishMaybe (/Users/rkstar/.meteor/packages/cosmos_browserify/.0.7.0.1pwzdl1++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:458:7)
  at endWritable (/Users/rkstar/.meteor/packages/cosmos_browserify/.0.7.0.1pwzdl1++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:469:3)
  at DestroyableTransform.Writable.end (/Users/rkstar/.meteor/packages/cosmos_browserify/.0.7.0.1pwzdl1++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:436:5)
  at StringTransform.onend (_stream_readable.js:502:10)
  at StringTransform.g (events.js:180:16)
  at StringTransform.emit (events.js:117:20)
  at _stream_readable.js:944:16
  at process._tickCallback (node.js:448:13)

previously i was getting errors about fbjs@^0.2.0 .... those have gone away after i changes the browserify.options.json file to use "react: Package[react-runtime].React.require

please help. i'm pretty lost right now.

@stubailo
Copy link
Contributor

Can you start a separate issue for this? This issue was just about the example not working with meteor 1.2.

@rkstar
Copy link

rkstar commented Sep 30, 2015

FYI -- i figured out the problem and posted a repo meteor-material-ui-example

@otroboe
Copy link

otroboe commented Sep 30, 2015

@rkstar Thx, your configuration works great !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants