preactjs / preact-cli

šŸ˜ŗ Your next Preact PWA starts in 30 seconds.
MIT License
4.69k stars 375 forks source link

Package exports for '@rollup\pluginutils' do not define a '.' subpath #1277

Closed Steffo99 closed 1 year ago

Steffo99 commented 4 years ago

Do you want to request a feature or report a bug?

Probably a bug.

What is the current behaviour?

I am getting the following error when trying to run preact watch on preact-cli@3.0.0-rc.16.

> steffoweb@0.1.1 start D:\Codice\steffoweb
> preact watch --template src/template.html

internal/modules/cjs/loader.js:488
    throw e;
    ^

Error: Package exports for 'D:\Codice\steffoweb\node_modules\@rollup\pluginutils' do not define a '.' subpath
    at applyExports (internal/modules/cjs/loader.js:485:15)
    at resolveExports (internal/modules/cjs/loader.js:508:12)
    at Function.Module._findPath (internal/modules/cjs/loader.js:577:20)
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:879:27)
    at Function.Module._load (internal/modules/cjs/loader.js:785:27)
    at Module.require (internal/modules/cjs/loader.js:956:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (D:\Codice\steffoweb\node_modules\@rollup\plugin-replace\dist\rollup-plugin-replace.cjs.js:6:19)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1103:10)
    at Module.load (internal/modules/cjs/loader.js:914:32)
    at Function.Module._load (internal/modules/cjs/loader.js:822:14)
    at Module.require (internal/modules/cjs/loader.js:956:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (D:\Codice\steffoweb\node_modules\workbox-build\build\lib\bundle.js:30:17)
    at Module._compile (internal/modules/cjs/loader.js:1063:30) {
  code: 'MODULE_NOT_FOUND'
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! steffoweb@0.1.1 start: `preact watch --template src/template.html`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the steffoweb@0.1.1 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\stepi\AppData\Roaming\npm-cache\_logs\2020-06-30T21_28_29_333Z-debug.log

If the current behaviour is a bug, please provide the steps to reproduce.

I am encountering the bug on all my repositories that are using preact-cli as soon as I run npm install or npm update.

Here's an example.

What is the expected behaviour?

The expected behaviour is preact watch running the development server as usual.

If this is a feature request, what is motivation or use case for changing the behaviour?

Please mention other relevant information.

I am pretty new to nodejs and npm, so it might be a mistake on my part, but I can't figure out how to solve it šŸ˜…

Please paste the results of preact info here.

Again, I am getting the same error:

D:\Codice\steffoweb>preact info
internal/modules/cjs/loader.js:488
    throw e;
    ^

Error: Package exports for 'D:\Codice\steffoweb\node_modules\@rollup\pluginutils' do not define a '.' subpath
    at applyExports (internal/modules/cjs/loader.js:485:15)
    at resolveExports (internal/modules/cjs/loader.js:508:12)
    at Function.Module._findPath (internal/modules/cjs/loader.js:577:20)
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:879:27)
    at Function.Module._load (internal/modules/cjs/loader.js:785:27)
    at Module.require (internal/modules/cjs/loader.js:956:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (D:\Codice\steffoweb\node_modules\@rollup\plugin-replace\dist\rollup-plugin-replace.cjs.js:6:19)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1103:10)
    at Module.load (internal/modules/cjs/loader.js:914:32)
    at Function.Module._load (internal/modules/cjs/loader.js:822:14)
    at Module.require (internal/modules/cjs/loader.js:956:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (D:\Codice\steffoweb\node_modules\workbox-build\build\lib\bundle.js:30:17)
    at Module._compile (internal/modules/cjs/loader.js:1063:30) {
  code: 'MODULE_NOT_FOUND'
}
Steffo99 commented 4 years ago

I think the problem is in the dependency chain:

@rollup/pluginutils < rollup-plugin-replace < workbox-webpack-plugin < preact-cli

rschristian commented 1 year ago

Going to close out, can't reproduce.

Might've been a typo in an upstream package?

Steffo99 commented 1 year ago

That's so old, it might have been! :joy:

rschristian commented 1 year ago

Heh, cleaning up old issues šŸ˜