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

rollup (still) not working - cannot find module 'node:process' #172

Open
Octaeon opened this issue Jun 11, 2023 · 1 comment
Open

rollup (still) not working - cannot find module 'node:process' #172

Octaeon opened this issue Jun 11, 2023 · 1 comment

Comments

@Octaeon
Copy link

Octaeon commented Jun 11, 2023

I downloaded the packaged repository, unpackaged it, installed nodejs and npm through nvm (latest stable version of nodejs 12), installed rollup, ran the command npm install in the directory where I unpackaged the repo, ran rollup -c, and I get this error message:

node:internal/modules/cjs/loader:927
  throw err;
  ^

Error: Cannot find module 'node:process'
Require stack:
- C:\Users\av3st\.nvm\versions\node\v15.14.0\bin\node_modules\rollup\dist\bin\rollup
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:924:15)
    at Function.Module._load (node:internal/modules/cjs/loader:769:27)
    at Module.require (node:internal/modules/cjs/loader:996:19)
    at require (node:internal/modules/cjs/helpers:92:18)
    at Module.<anonymous> (C:\Users\av3st\.nvm\versions\node\v15.14.0\bin\node_modules\rollup\dist\bin\rollup:16:19)
    at Module._compile (node:internal/modules/cjs/loader:1092:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1121:10)
    at Module.load (node:internal/modules/cjs/loader:972:32)
    at Function.Module._load (node:internal/modules/cjs/loader:813:14)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:76:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    'C:\\Users\\av3st\\.nvm\\versions\\node\\v15.14.0\\bin\\node_modules\\rollup\\dist\\bin\\rollup'
  ]
}

I tried searching for this error, but all I got from stackOverflow is that I should try and change the NodeJS version. I can't say I've done everything I can because honestly, I'm quite tired at this point, so I'll just ask people who are more experienced than me (I haven't written anything with NodeJS in my life and I'm just using it to try and code Screeps in TypeScript because I despise JavaScript).

Sorry if I came off rude, I really am quite tired and cranky. Thanks in advance for any ideas.

@HenryClones
Copy link

The command given to install RollUp in the README installs the latest version, which uses syntax incompatible with Node 12.x. I would recommend installing an older version of RollUp for now, such as sudo npm install -g [email protected], or whichever version that as of time of writing is a year old, since Node 12.x's latest release was in 2022.

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