tomberek / aor-postgrest-client

postREST client for admin-on-rest
MIT License
78 stars 33 forks source link

Module not found with admin-on-rest #1

Closed mrcasablr closed 6 years ago

mrcasablr commented 7 years ago

Im looking forward to using this client with admin-on-rest 0.7.2 version

I'm on Fedora 25 x86_64 with npm 3.10.10 and node 6.9.4

My sec/App.js looks like -

// in src/App.js
import React from 'react';
import { Admin, Resource } from 'admin-on-rest';
import postgrestClient from 'aor-postgrest-client';
import { CityList } from './geo_city';

const App = () => (
    <Admin restClient={postgrestClient('http://localhost:3000')}>
        <Resource name="geo_city" list={CityList} />
    </Admin>
);

export default App;

and I get

Failed to compile.

Error in ./src/App.js
Module not found: 'aor-postgrest-client' in /home/xxx/src/test-admin/test-admin/src

 @ ./src/App.js 14:26-57

aor-postgrest-client is installed in node_modules/aor-postgrest-client/

fab1an commented 7 years ago

The author of this forgot to transpile his module into ES5, apparently :(

lucafallabrino commented 7 years ago

Hello, i have a very similar problem to the one described above. A solution has been found ?

JCFerrerG commented 6 years ago

The entry point (main) file for this package is lib/index.js. This file is missing from the package published to npmjs.org. It seems the author created a command, make build, to transpile src\index.js -> lib\index.js, but did not run it before the package was last published.

As a workaround, you can follow these steps:

tomberek commented 6 years ago

Updated and published 0.2.4. Thanks!