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

create-nollup-app React template failing #5

Closed
thomasdigby opened this issue Nov 3, 2021 · 9 comments
Closed

create-nollup-app React template failing #5

thomasdigby opened this issue Nov 3, 2021 · 9 comments

Comments

@thomasdigby
Copy link

When running the standard create-nollup-app command to bootstrap a React project:

npx create-nollup-app --name nollup-test --template react
cd nollup-test
npm install --legacy-peer-deps
npm start

I get this issue with @rollup/plugin-node-resolve: TypeError: Cannot read properties of undefined (reading 'custom').

Versions

Node: 16.10.0 (also attempted with 14.17.1)
NPM: 7.24.0

All other versions are as defined in the standard package.json from the react template.

➜ npm start       

> start
> nollup -c --environment NODE_ENV:development

babelHelpers: 'bundled' option was used by default. It is recommended to configure this option explicitly, read more here: https://github.com/rollup/plugins/tree/master/packages/babel#babelhelpers
[Nollup] Listening on http://localhost:8080
/Users/thomasdigby/Projects/nollup-test/node_modules/@rollup/plugin-node-resolve/dist/cjs/index.js:1162
      const resolved = await doResolveId(this, importee, importer, resolveOptions.custom);
                                                                                  ^

TypeError: Cannot read properties of undefined (reading 'custom')
    at Object.resolveId (/Users/thomasdigby/Projects/nollup-test/node_modules/@rollup/plugin-node-resolve/dist/cjs/index.js:1162:83)
    at _callAsyncHook (/Users/thomasdigby/Projects/nollup-test/node_modules/nollup/lib/impl/PluginLifecycle.js:22:39)
    at callAsyncFirstHook (/Users/thomasdigby/Projects/nollup-test/node_modules/nollup/lib/impl/PluginLifecycle.js:54:24)
    at async Object.resolveIdImpl (/Users/thomasdigby/Projects/nollup-test/node_modules/nollup/lib/impl/PluginLifecycle.js:202:18)
    at async Array.resolveId (/Users/thomasdigby/Projects/nollup-test/node_modules/nollup/lib/impl/PluginLifecycle.js:292:24)
    at async resolveInputId (/Users/thomasdigby/Projects/nollup-test/node_modules/nollup/lib/impl/NollupContext.js:13:20)
    at async /Users/thomasdigby/Projects/nollup-test/node_modules/nollup/lib/impl/NollupContext.js:41:20
    at async Promise.all (index 0)
    at async getInputEntries (/Users/thomasdigby/Projects/nollup-test/node_modules/nollup/lib/impl/NollupContext.js:40:16)
    at async NollupContext.initialize (/Users/thomasdigby/Projects/nollup-test/node_modules/nollup/lib/impl/NollupContext.js:176:22) {
  __isNollupError: true
}

As an aside, I tried this with preact and barebones templates and got the same result.

Thanks!

@PepsRyuu
Copy link
Owner

PepsRyuu commented Nov 3, 2021

That's odd. Thanks for the report. Will look into this as soon as I can. Does downgrading the resolve plugin work?

@thomasdigby
Copy link
Author

@PepsRyuu Ah I should have tried that, sorry. @rollup/[email protected] seems to be working fine! 🙏

@PepsRyuu
Copy link
Owner

PepsRyuu commented Nov 3, 2021

Just to confirm, what version of resolve plugin was breaking?

@thomasdigby
Copy link
Author

13.0.6 was broken. The issue has been logged on the rollup repo rollup/plugins#1016

@PepsRyuu
Copy link
Owner

PepsRyuu commented Nov 3, 2021

Hmmm, not sure if it's a problem with the plugin. There's comments that indicate there's nothing wrong with the plugin. Will need to have a dig into it to see if this is something Nollup is potentially missing. Should know for certain later this evening.

@PepsRyuu
Copy link
Owner

PepsRyuu commented Nov 3, 2021

These are recent Rollup features from the looks of it. Created a separate ticket to track this: PepsRyuu/nollup#218

@PepsRyuu
Copy link
Owner

PepsRyuu commented Nov 3, 2021

https://github.com/PepsRyuu/nollup/pull/219/files Almost finished with it. Will test it further and likely release tomorrow.

@PepsRyuu
Copy link
Owner

PepsRyuu commented Nov 4, 2021

Fixed Nollup in release 0.18.6 which fixes this issue.

@PepsRyuu PepsRyuu closed this as completed Nov 4, 2021
@thomasdigby
Copy link
Author

Appreciate the quick turn around @PepsRyuu! 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants