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

lavamoat whitelist error when building master #13253

Open
superqd opened this issue Jan 9, 2022 · 7 comments
Open

lavamoat whitelist error when building master #13253

superqd opened this issue Jan 9, 2022 · 7 comments
Labels
area-buildSystem related to our build system contributor experience An issue that impacts, or planned improvement to, the contributor experience.

Comments

@superqd
Copy link

superqd commented Jan 9, 2022

When I pull the latest master branch copy and try to build, I get the following error.

  1. I ran yarn setup
  2. I ran yarn build dev
  3. Got the error:

Error: LavaMoat - required node builtin package not in whitelist: package "@nodelib\fs.stat" requested "fs" as "fs"
at requireRelative (LavaMoat/core/kernel:519:15)
at requireRelativeWithContext (LavaMoat/core/kernel:471:16)
at Object.eval (D:\projects\nft\metamask\node_modules@nodelib\fs.stat\out\adapters\fs.js:4:12)
at internalRequire (LavaMoat/core/kernel:458:25)
at requireRelative (LavaMoat/core/kernel:499:27)
at requireRelativeWithContext (LavaMoat/core/kernel:471:16)
at Object.eval (D:\projects\nft\metamask\node_modules@nodelib\fs.stat\out\settings.js:4:12)
at internalRequire (LavaMoat/core/kernel:458:25)
at requireRelative (LavaMoat/core/kernel:499:27)
at requireRelativeWithContext (LavaMoat/core/kernel:471:16)

I am running node 14.15.1, yarn 1.22.17.

I also tried running this:

yarn add @nodelib\fs.stat

I then ran yarn build dev again, and got this error:

TypeError: Cannot assign to read only property 'name' of function 'function createError(opts) {
var result = new Error();
Object.defineProperty(result, 'type', {...... }'

at extend (D:\projects\nft\metamask\node_modules\xtend\mutable.js:12:29)
at TypedError (D:\projects\nft\metamask\node_modules\error\typed.js:26:5)
at Object.eval (D:\projects\nft\metamask\node_modules\body\any.js:10:28)
at internalRequire (LavaMoat/core/kernel:458:25)
at requireRelative (LavaMoat/core/kernel:499:27)
at requireRelativeWithContext (LavaMoat/core/kernel:471:16)
at Object.eval (D:\projects\nft\metamask\node_modules\tiny-lr\src\server.js:36:12)
at internalRequire (LavaMoat/core/kernel:458:25)
at requireRelative (LavaMoat/core/kernel:499:27)
at requireRelativeWithContext (LavaMoat/core/kernel:471:16)

Any ideas? I'm very unfamiliar with lavamoat...

@darkwing darkwing added the area-buildSystem related to our build system label Jan 10, 2022
@BoxedFruits
Copy link
Contributor

BoxedFruits commented Feb 5, 2022

I've been having the same problem. Were you able to resolve it?

@BoxedFruits
Copy link
Contributor

i switched to linux and everything runs for the most part now. it still taking forever to build things though

@superqd
Copy link
Author

superqd commented Feb 7, 2022

I have not tried this on linux, but it still fails on Windows

@EmanCanCode
Copy link

I had the same error. I have used Linux and it worked for me. ubuntu v20.04

@jesseharte
Copy link
Contributor

Possible duplicate of #10748.

@weizman
Copy link
Member

weizman commented Jun 21, 2022

Encountered the same issue, here's my experience:

In my case, it seems that the issue pops up whenever I change something that has to do with the project's dependencies, such as yarn install when a package changes or something like that.

What fixed it immediately for me was to simply rerun yarn setup command before trying to build the project.

Let me know if that helped

@brad-decker brad-decker added the contributor experience An issue that impacts, or planned improvement to, the contributor experience. label Sep 27, 2022
@dhruvv173
Copy link
Contributor

hey @superqd were you able to find a way around this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-buildSystem related to our build system contributor experience An issue that impacts, or planned improvement to, the contributor experience.
Projects
None yet
Development

No branches or pull requests

9 participants