Comments (14)
Sure.
First, clone the repo admin-on-rest repo locally, and then use a symbolic link on your side project:
cd admin-on-rest
npm link
cd ../my-project
npm link admin-on-rest
Second time I write it today => I open a PR to add this dev tip in the README.
from react-admin.
What version of node do you use?
from react-admin.
I use the version that comes with my distribution, I hope it matches the requirements:
node --version
v4.2.6
from react-admin.
I recommend you to test with a higher version of node, like 5 or 6.
I'll try to reproduce the issue.
from react-admin.
Thanks, I'll try that tomorrow!
from react-admin.
There is a bug in the fetchUtils
export in the lib. I'll try and fix that.
from react-admin.
Thanks for fixing this so quickly!
Noob question: how can I try it out? It looks like you can't just specify master
as a version constraint for npm, so do I need to rm -rf
the module, use git
to get the master version, and then run npm install
inside the freshly cloned repo? Or is there a simpler way? Or maybe you could just create a new release?
I recommend you to test with a higher version of node, like 5 or 6.
@Kmaschta : I tried it with node v5 and v6 and get the exact same error.
so do I need to rm -rf the module, use git to get the master version, and then run npm install inside the freshly cloned repo?
This strategy does not seem to work out for obscure reasons, so… I'm kind of stuck.
from react-admin.
You can use npm ls
... @jpetitcolas can you remind me how it works?
from react-admin.
Huh… so the first npm link
fails for the same obscure reasons :
Stack trace
sudo npm link
npm WARN optional dep failed, continuing [email protected]
npm WARN deprecated [email protected]: to-iso-string has been deprecated, use @segment/to-iso-string instead.
npm WARN deprecated [email protected]: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN optional dep failed, continuing [email protected]
npm ERR! peerinvalid The package react does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer [email protected] wants react@^15.0.0
npm ERR! peerinvalid Peer [email protected] wants react@^15.3.0
npm ERR! peerinvalid Peer [email protected] wants react@^0.14.0 || ^15.0.0-0
npm ERR! peerinvalid Peer [email protected] wants react@^0.14.0 || ^15.0.0
npm ERR! peerinvalid Peer [email protected] wants react@^15.0.0-0
npm ERR! peerinvalid Peer [email protected] wants [email protected] || 0.14.x || ^15.0.0-0
npm ERR! peerinvalid Peer [email protected] wants react@^15.3.0
npm ERR! System Linux 4.4.0-36-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "link"
npm ERR! cwd /home/users/gparis/dev/admin-on-rest
npm ERR! node -v v4.2.6
npm ERR! npm -v 1.4.15
npm ERR! code EPEERINVALID
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/users/gparis/dev/admin-on-rest/npm-debug.log
npm ERR! not ok code 0
I'm using sudo
b/c npm link
tries to write to /usr/lib/node_modules/admin-on-rest
, not sure if this is normal or if there is something wrong with my setup.
from react-admin.
Documentation proposal submitted: marmelab/admin-on-rest#19
from react-admin.
I think this is a setup issue. As you sudo
the link, npm perhaps ignore your local project dependencies (including React and so on). Not an expert of it. How did you install npm?
from react-admin.
How did you install npm?
I don't remember, but I'll dig into that then. It looks like I installed it with my package manager, then removed it and installed it some other way :
dpkg -l |grep npm
rc npm 1.1.4~dfsg-2 all package manager for Node.js
UPDATE: Ok so my version of npm was incredibly outdated… (v1.4.15 , and I have v3.10.7 now)
from react-admin.
I followed @jpetitcolas ' guide and managed to run both link commands without errors, the results looks fine:
ls -l node_modules/admin-on-rest
lrwxrwxrwx 1 gparis gparis 52 sept. 7 11:44 node_modules/admin-on-rest -> ../../../../../../usr/lib/node_modules/admin-on-rest
ls -l node_modules/admin-on-rest/
total 44
-rw-r--r-- 1 gparis gparis 379 sept. 6 17:48 CHANGELOG.md
drwxr-xr-x 2 gparis gparis 4096 sept. 7 11:10 docs
drwxr-xr-x 2 gparis gparis 4096 sept. 7 11:10 example
-rw-r--r-- 1 gparis gparis 1105 sept. 6 17:48 LICENSE.md
-rw-r--r-- 1 gparis gparis 325 sept. 6 17:48 Makefile
drwxr-xr-x 37 gparis gparis 4096 sept. 7 11:38 node_modules
-rw-r--r-- 1 gparis gparis 1718 sept. 6 17:49 package.json
-rw-r--r-- 1 gparis gparis 5162 sept. 6 17:48 README.md
drwxr-xr-x 8 gparis gparis 4096 sept. 7 11:10 src
-rw-r--r-- 1 gparis gparis 258 sept. 6 17:48 webpack.config.js
The npm start
output, not so :
Error in ./src/posts.js
Module not found: Error: Cannot resolve module 'admin-on-rest/lib/mui' in /home/users/gparis/workspace/dashboard-ui/src
@ ./src/posts.js 12:11-43
Error in ./src/App.js
Module not found: Error: Cannot resolve module 'admin-on-rest' in /home/users/gparis/workspace/dashboard-ui/src
@ ./src/App.js 11:19-43
I noticed that there is no lib directory in admin-on-rest
, but maybe this should resolve to something else, like node_modules/admin-on-rest/node_modules/material-ui/
, which does exist. Maybe I need to run another command? Also what about the requirement in the package.json
manifest? Should I remove it? Leave it as is?
from react-admin.
Ok so after some digging it appears that I need to run make build
in admin-on-rest
to make that work, see #20
from react-admin.
Related Issues (20)
- SimpleForm isDirty is always true if ArrayInput is used HOT 3
- [RFC] package ra-data-json-server adaption of consistent getMany HOT 1
- TabbedForm crashes if children is an array of react elements HOT 1
- Security Risk, Default install allows request access to all files. HOT 1
- Can not disable ra.action.clear_input_value in SelectInput HOT 1
- Add a meta prop to react-admin reference components HOT 1
- `TextInput` component not handling events during the initial life cycles HOT 4
- combineDataProviders does not support more than 2 parameters in custom dataProvider methods HOT 1
- `CoreAdminUI` wraps everything in a `<div>` HOT 2
- useWatch on fields with required in edit is not working HOT 1
- The 'QueryClient' type does not have queryCache, mutationCache, defaultOptions, queryDefaults and four other properties of the 'QueryClient' type. HOT 3
- CheckboxGroupInput : disabling some of the checkboxes Feature HOT 3
- Bug / Breaking change without major for useTheme behaviour HOT 5
- Multiple expandable datagrids: expanding a row triggers all datagrids to expand HOT 2
- AutocompleteInput in ReferenceArrayInput with dynamic choices shows empty field on selection HOT 5
- Property "resource" in SortButtonProps not involved HOT 2
- Change title property type in core display components <Edit>, <Show>, <View> HOT 1
- Standalone version of the Store for a dual-store strategy HOT 3
- Unable to clear default value in DateTimeInput component HOT 2
- Documented theme level defaultProps overrides do not work for react admin components HOT 4
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-admin.