Comments (5)
Hi,
npm run <command>
should use locally installed packages (i.e. from the project's node_modules). The dependencies are listed under devDependencies
.
Can you post the error you get? And which versions of NPM and Node.js you are using?
Babel-plugin-transform was accidentally in devDependencies
. I will fix that.
babel-plugin-transform-class-properties
is not in devDependencies, and might be needed with older NPM versions.
from react-share.
Thanks for the quick reply. Looks like the first error tripped me up locally and I assumed the following packages needed to be installed globally by inspecting the package.json file.
However, whenever I run npm link
after successfully running npm run-script build
in react-share, in the project that is linking to this library I get the following webpack error:
ERROR in ../react-share/lib/react-share.js
Module build failed: ReferenceError: Unknown plugin "syntax-flow" specified in "base" at 0, attempted to resolve relative to "/home/matt/workspace/react-share/lib"
at /home/matt/workspace/boardom/node_modules/babel-core/lib/transformation/file/options/option-manager.js:220:17
at Array.map (native)
at Function.normalisePlugins (/home/matt/workspace/boardom/node_modules/babel-core/lib/transformation/file/options/option-manager.js:196:20)
at OptionManager.mergeOptions (/home/matt/workspace/boardom/node_modules/babel-core/lib/transformation/file/options/option-manager.js:317:36)
at OptionManager.init (/home/matt/workspace/boardom/node_modules/babel-core/lib/transformation/file/options/option-manager.js:506:10)
at File.initOptions (/home/matt/workspace/boardom/node_modules/babel-core/lib/transformation/file/index.js:243:89)
at new File (/home/matt/workspace/boardom/node_modules/babel-core/lib/transformation/file/index.js:159:72)
at Pipeline.transform (/home/matt/workspace/boardom/node_modules/babel-core/lib/transformation/pipeline.js:49:16)
at transpile (/home/matt/workspace/boardom/node_modules/babel-loader/index.js:14:22)
at /home/matt/workspace/boardom/node_modules/babel-loader/lib/fs-cache.js:145:18
at ReadFileContext.callback (/home/matt/workspace/boardom/node_modules/babel-loader/lib/fs-cache.js:28:23)
at FSReqWrap.readFileAfterOpen [as oncomplete] (fs.js:303:13)
@ ./client/src/js/ui/react/components/Social.js 13:18-40
How is this any different than the built assets from npm install react-share
?
from react-share.
~/workspace/react-share
~/workspace/react-share
➤ npm --version
2.14.12
~/workspace/react-share
➤ node --version
v4.3.1
Pretty new versions of npm and node. In my project I'm using babel-core @ 6.9.0
from react-share.
Your NPM version is rather old. NPM has had major changes since v2.x regarding how it deals with nested dependencies. Node.js v4 is fine.
I would suggest you to run npm install -g npm
to upgrade to the newest version, and then try again.
If that doesn't help, try running npm cache clean && npm prune && npm install
in the project folder.
Simply running npm install && npm run run-demos
should get you up and running in the ideal case!
from react-share.
Simply running npm install && npm run run-demos should get you up and running in the ideal case!
That's the dream.
Anyway, npm install babel-plugin-syntax-flow
in react-share
fixed the issue locally for me. I've cloned the repo to add a disabled
state. I'll send the PR your way.
from react-share.
Related Issues (20)
- Feature request - NOSTR support
- Pinterest Share button does not work
- when I share through whatsapp in IOS device , it is redirecting me on whatsapp App but also opening an extra tab which is not required, what can I do this case? HOT 2
- Feature Request - Support For Threads App
- Hi, is it planned to support the new Twitter "X" icon? Thanks :) HOT 9
- Facebook Share Button does nothing HOT 4
- How to catch the event of sharing the link on facebook successfully or the user does not share? HOT 2
- defaultProps will be removed HOT 1
- Twitter Button Icon to X HOT 5
- EmailShareButton not working on safari web browser HOT 2
- Can not add any message to FacebookMessengerShareButton
- Support share to kakao talk
- react-share stopped working with react/ react-dom 17.0.2, and broken style text block showing in the twitter page HOT 6
- Missing `index.umd.cjs` in final build HOT 2
- Module not found: Error: Can't resolve 'react/jsx-runtime' in 'node_modules/react-share/dist' HOT 8
- While Sharing on Twitter the page says "Some error occured"
- Facebook Messenger not working
- type error HOT 1
- Any method is there which can return popup is blocked? HOT 1
- Feature Request - Support For Mastodon
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-share.