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

Can't resolve '../component-index' in '/usr/ports/net-im/element-web/work/element-web-1.7.7/src/vector' #15751

Closed
phicoh opened this issue Nov 16, 2020 · 4 comments
Labels

Comments

@phicoh
Copy link

phicoh commented Nov 16, 2020

Description

Compiling element-web fails on FreeBSD with the following error:
ModuleNotFoundError: Module not found: Error: Can't resolve '../component-index'
in '/usr/ports/net-im/element-web/work/element-web-1.7.7/src/vector'

This can be trace back to:
$ node_modules/.bin/reskindex -h src/header
Error moving new index into place: Error: ENOENT: no such file or directory, rename 'src/component-index.js.tmp' -> 'src/component-index.js'

Surprisingly, the rename happens before component-index.js.tmp is written out.

This is FreeBSD 12.2-RELEASE, node 15.2.0, yarn 1.22.4_1

Note that it used to work before, so I assume something changed in the way node or yarn works.

A quick work around is to run reskindex twice.

Steps to reproduce

In the makefile of my port I have:
do-build:
{
cd ${WRKSRC};
pwd;
yarn install;
cp config.sample.json config.json;
DIST_VERSION="${DISTVERSION}" yarn dist;
rm config.json;
}

The result is that I can't compile element-web anymore.

Logs being sent: yes/no

Version information

  • Platform: web (in-browser) or desktop?

For the web app:

  • Browser: Chrome, Safari, Firefox? which version?
  • OS: Windows, macOS, Ubuntu, Arch Linux, etc?
  • URL: develop.element.io / app.element.io / somewhere else? If a private server, what version of Element Web?

For the desktop app:

  • OS: Windows, macOS, Ubuntu, Arch Linux, etc?
  • Version: 1.x.y
@turt2live
Copy link
Member

Use #element-dev:matrix.org for developer support please.

@jaltek
Copy link

jaltek commented Nov 20, 2020

@phicoh Did you find a solution because I have the same problem with Arch Linux (Manjaro)

@phicoh
Copy link
Author

phicoh commented Nov 20, 2020

A quick hack:

--- package.json.orig 2020-11-16 14:36:48 UTC
+++ package.json
@@ -31,7 +31,7 @@
"i18n": "matrix-gen-i18n",
"prunei18n": "matrix-prune-i18n",
"diff-i18n": "cp src/i18n/strings/en_EN.json src/i18n/strings/en_EN_orig.json && yarn i18n && node scripts/compare-file.js src/i18n/strings/en_EN_orig.json src/i18n/strings/en_EN.json",
- "reskindex": "reskindex -h src/header",
+ "reskindex": "reskindex -h src/header; reskindex -h src/header",
"reskindex:watch": "reskindex -h src/header -w",
"reskindex:watch-react": "node scripts/yarn-sub.js matrix-react-sdk reskindex:watch",
"clean": "rimraf lib webapp",

@michi7801
Copy link

I got the same problem on MacOS, but the suggested fix does not work for me

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

No branches or pull requests

4 participants