-
Notifications
You must be signed in to change notification settings - Fork 320
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 not working #169
Comments
instead of renaming it to .mjs you can add |
One problem after updating everything is that errormapper will stop working .. not sure which update it was e.g.: |
@M0lion can you share net diff of what you did to get things working? I had the same issue you had. |
(revised message lower)
|
I've done a bit more testing: |
Yea. One thing to note is that this game is stuck in the past in many ways. While much of the "build process" should be able to be updated to keep track modern Node versions, anything that is compiled to actually run in the game needs to be compatible with the game's Node version and general restrictions of running in the game environment (ex. no reliable async). The |
Have anyone solved this problem? |
For people whose sourcemap doesn't work properly, this might be useful. |
I just created a new repo with this as a template and the rollup wasn't working.
I'm using node v18.12.1 and had to remove the thing in package.json requiring node v10 or v12, so I don't know if this happens on those versions, but they're quite old, so maybe update it. I don't know why it's there so I don't know what the right move here is.
At first I got this error
Error loading `tslib` helper library. [!] Error: Package subpath './package.json' is not defined by "exports" in /home/molion/Documents/screeps/node_modules/tslib/package.json
I fixed it by updating all the rollup stuff to the latest version.
Then I got some errors complaining about rollup.config.js probably being an esm file, the message suggested renaming it to .mjs. I tried that, but got some error complaining about use if require().
I changed back to .js and rewrote it to using require instead of import.
I then made a small change because of @rollup/plugin-node-resolve exports not being what was expected.
Now it's working.
I could submit a PR with these changes, but I'm not sure what to do about the node version thing.
The text was updated successfully, but these errors were encountered: