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

npm registry lookup failed for "@npm/object-assign": Package doesn't exist. #919

Closed
Aloento opened this issue Apr 12, 2022 · 3 comments
Closed
Labels
bug Something isn't working duplicate This issue or pull request already exists

Comments

@Aloento
Copy link

Aloento commented Apr 12, 2022

Describe the bug
After compiling, at the top of @npm/prop-types, there're

import require$$0 from '/@npm/react-is'; // sometime is wrong with "./@npm/react-is"
import require$$1 from './@npm/object-assign';

the original prop-types.js file is:

var ReactIs = require('react-is');
var assign = require('object-assign');

Then, './@npm/object-assign' is /@npm/@npm/object-assign, which is incorrect path.

object-assign required by prop-types required by react-helmet-async

To Reproduce
yarn create wmr & yarn add react-helmet-async

index.js

export function App() {
  return (
    <LocationProvider>
+      <HelmetProvider>
        <div class="app">
          <Header />
          <ErrorBoundary>
            <Router>
              <Route path="/" component={Home} />
              <Route path="/about" component={About} />
              <Route default component={NotFound} />
            </Router>
          </ErrorBoundary>
        </div>
+      </HelmetProvider>
    </LocationProvider>
  );
}

Does anybody know how to fix this path?

@rschristian
Copy link
Member

WMR doesn't have great support of pure CJS dependencies, which does limit some of the React ecosystem.

We use hoofd in the docs for this repo, which I can recommend in its place, but it is a different API.

@developit
Copy link
Member

Yes - just to clarify, WMR has some CommonJS support, but packages published by the React team use a complex CommonJS setup that is very difficult (and in some cases impossible) to handle on-the-fly.

@developit developit added the duplicate This issue or pull request already exists label Apr 12, 2022
@developit
Copy link
Member

I'm going to dedupe this with #903 (thanks for pointing to that issue @Aloento!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants