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)
- Documentation update in sample. HOT 3
- NumberInput's `onBlur` prop does not provide an event object HOT 2
- Add ability to customize query string format for lists HOT 5
- i want to show the received gmail in react js app
- AutoComplete choice listing issue when using useChoicesContext HOT 1
- react admin error with Menu.Item missing properties HOT 6
- storeKey prop is not passed to useRecordSelection hook inside useListController HOT 5
- useEditContext returns null for both values HOT 5
- Infinite loop occurs in page rendering when perPage is set to a negative number in List Component HOT 2
- Codemods are not included in ra-core v5
- Duplicate entries in documentation search HOT 2
- `<PasswordInput/>` or `<TextInput/>` has corrupted `validate` prop, if field is handled with `disabled` prop HOT 4
- Auth provider login Promise rejection with "message" doesn't trigger notification message HOT 1
- When we use useRedirect hook to go back to a List Component, the pagination is reseted to page 1
- <AutocompleteInput> and <AutocompleteInputArray> refetch choises passed from graphql HOT 1
- Fields inside the ArrayInput aren't set as dirty when built HOT 1
- When a form contains ArrayInput with large entries. It takes more than a minute for a form to be submitted. HOT 2
- Bug in Translation in post edit page showing (post "some text here") HOT 1
- Dark mode become default upgrading react-admin package HOT 1
- AutocompleteInput with ReferenceInput calling getList() two times after select on sugestion list HOT 1
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.