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

support for react-native 0.30.0 #42

Open
radiegtya opened this issue Aug 10, 2016 · 10 comments
Open

support for react-native 0.30.0 #42

radiegtya opened this issue Aug 10, 2016 · 10 comments

Comments

@radiegtya
Copy link

radiegtya commented Aug 10, 2016

I got this error message:

Transform errror...

/node_modules/react-avatar/lib/index.js: Unknown plugin "add-module-exports" specified in 

"/Users/.../node_modules/react-avatar/.babelrc" at 0, attempted to...
@perrosnk
Copy link

perrosnk commented Sep 25, 2016

When will this be fixed?
It seems there is an error during installation:
npm WARN [email protected] requires a peer of react@^0.14.8 but none was installed.

@Sitebase
Copy link
Member

@radiegtya strange because this dependency is in the package.json file.
Can you check your node_modules folder to see if there is a subfolder called babel-plugin-add-module-exports?

@perrosnk your problem doesn't seem related to this issue. Can you try the new version 2.2.1 version. If there is still an issue after the update, feel free to create an issue.

@perrosnk
Copy link

There wasn't any package in the node_module folder called babel-plugin-add-module-exports nor react-addons-shallow-compare.
So I run:
npm install --save react-addons-shallow-compare

npm install --save babel-plugin-add-module-exports

But then I had a problem with another package so I then run:
npm install --save babel-plugin-transform-runtime

But again, I had another problem, and it seems it never stops.

@Sitebase could you please help? Are you able to run it?

@Sitebase
Copy link
Member

I did a clean install

  • remove node_modules
  • run npm install
  • run npm run dev

worked without a problem here.
Can you test these commands in your react-avatar folder? If that works the problem is probably a conflict with another library.

@perrosnk
Copy link

@Sitebase what version of react-native did you use?

@perrosnk
Copy link

@Sitebase

  1. I created a new project by running react-native init testavatar
  2. I run npm install --save react-avatar
  3. react-native run-ios. Till now the project runs fine.
    the dependencies:
    "dependencies": { "react": "15.3.2", "react-avatar": "^2.2.1", "react-native": "0.34.1" }
  4. Imported react-avatar into the file: import {Avatar} from 'react-avatar' and included it <Avatar name="Wim Mostmans" size="150" />

Now the project fails with this error:
`

ReferenceError: Unknown plugin "transform-runtime" specified in "/Users/perros/rn/testavatar/node_modules/react-avatar/.babelrc" at 0, attempted to resolve relative to "/Users/perros/rn/testavatar/node_modules/react-avatar"
at /Users/perros/rn/testavatar/node_modules/babel-core/lib/transformation/file/options/option-manager.js:172:17
at Array.map (native)
at Function.normalisePlugins (/Users/perros/rn/testavatar/node_modules/babel-core/lib/transformation/file/options/option-manager.js:150:20)
at OptionManager.mergeOptions (/Users/perros/rn/testavatar/node_modules/babel-core/lib/transformation/file/options/option-manager.js:224:36)
at OptionManager.init (/Users/perros/rn/testavatar/node_modules/babel-core/lib/transformation/file/options/option-manager.js:359:12)
at File.initOptions (/Users/perros/rn/testavatar/node_modules/babel-core/lib/transformation/file/index.js:221:65)
at new File (/Users/perros/rn/testavatar/node_modules/babel-core/lib/transformation/file/index.js:141:24)
at Pipeline.transform (/Users/perros/rn/testavatar/node_modules/babel-core/lib/transformation/pipeline.js:46:16)
at transform (/Users/perros/rn/testavatar/node_modules/react-native/packager/transformer.js:108:26)
TransformError: /Users/perros/rn/testavatar/node_modules/react-avatar/lib/index.js: Unknown plugin "transform-runtime" specified in "/Users/perros/rn/testavatar/node_modules/react-avatar/.babelrc" at 0, attempted to resolve relative to "/Users/perros/rn/testavatar/node_modules/react-avatar"
`

  1. cd node_modules and then cd react-avatar. Then npm install
    During installation I get these errors:

    `npm WARN deprecated [email protected]: cross-spawn no longer requires a build toolchain, use it instead!
    npm WARN deprecated [email protected]: This package is deprecated. Use Object.assign.
    npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
    npm WARN prefer global [email protected] should be installed with -g

    [email protected] postinstall /Users/perros/rn/testavatar/node_modules/react- native/node_modules/spawn-sync
    node postinstall
    `

  2. run npm run dev
    I get these errors:

    npm ERR! Darwin 15.5.0
    npm ERR! argv "/usr/local/Cellar/node/6.6.0/bin/node" "/usr/local/bin/npm" "run" "dev"
    npm ERR! node v6.6.0
    npm ERR! npm v3.10.8

npm ERR! missing script: dev
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! https://github.com/npm/npm/issues

npm ERR! Please include the following file with any support request:
npm ERR! /Users/perros/rn/testavatar/node_modules/react-native/npm-debug.log

  1. cd back to project's directory and run react-native run-ios
    I get the same errors as step 3 above

@Sitebase
Copy link
Member

@perrosnk I was not using react-native. It's probably best that someone else with react native experience takes a look at this.

@perrosnk
Copy link

@Sitebase It will be very nice if this could work with react native. There is no package in react-native that can provide a letter avatar. I believe it would become pretty popular too.

@JorgenEvens
Copy link
Member

If there is someone else who would like to look into this we are happy to accept a PR.

@sturmenta-settle
Copy link

this problem when try to install on react-native

Screenshot 2023-02-24 at 13 23 38

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

No branches or pull requests

5 participants