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

Installation problem #1797

Closed
michalcesek opened this issue Apr 28, 2020 · 7 comments
Closed

Installation problem #1797

michalcesek opened this issue Apr 28, 2020 · 7 comments
Assignees

Comments

@michalcesek
Copy link

michalcesek commented Apr 28, 2020

Question
I followed instructions on this page: https://docs.requarks.io/install/windows but when I type command "node server" I receive following error message:

node : internal/modules/cjs/loader.js:983
At line:1 char:1
+ node server
+ ~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (internal/modules/cjs/loader.js:983:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError
 
  throw err;
Error: Cannot find module 'C:\Users\xxxxx\server'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:980:15)
    at Function.Module._load (internal/modules/cjs/loader.js:862:27)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12)
    at internal/main/run_main_module.js:18:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

Host Info (please complete the following information):
OS: Windows 10
Wiki.js version: 2.3.77
Database engine: postgres 10.12
Node.js: 12.16.2

@AlexandreDeCarli
Copy link

AlexandreDeCarli commented Apr 30, 2020

I receive same error in linux installation

root@linux-B:/media/DISK3/var/www/wiki.limbersoftware.com.br# node server
internal/modules/cjs/loader.js:621
throw e;
^

Error: No valid exports main found for '/media/DISK3/var/www/wiki.limbersoftware.com.br/node_modules/nanoid'
at resolveExportsTarget (internal/modules/cjs/loader.js:618:9)
at applyExports (internal/modules/cjs/loader.js:499:14)
at resolveExports (internal/modules/cjs/loader.js:548:12)
at Function.Module._findPath (internal/modules/cjs/loader.js:650:22)
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:948:27)
at Function.Module._load (internal/modules/cjs/loader.js:854:27)
at Module.require (internal/modules/cjs/loader.js:1023:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object. (/media/DISK3/var/www/wiki.limbersoftware.com.br/server/index.js:7:20)
at Module._compile (internal/modules/cjs/loader.js:1128:30) {
code: 'MODULE_NOT_FOUND'
}
Host Info (please complete the following information):
OS: Ubuntu 18.04.4 LTS
Wiki.js version: 2.3.77
Database engine: postgres 9.5.21
Node.js: v13.3.0

@sray
Copy link

sray commented May 1, 2020

@Alexandredc @michalcesek @fhiegel @asynder @FelixSFD
There is something missing in the nanoid upgrade guide here: https://github.com/ai/nanoid/releases/tag/3.0.0

I encountered the same problem, you folks had. The solution to fix the problem is to upgrade your nodejs to at least 13.12.0 (the details as to why are described in detail here: ai/nanoid#206 ). I upgraded to 13.14.0 and solved the problem with it.
If you can confirm, that a nodejs upgrade also helps you in MacOSX and Ubuntu environments, then https://docs.requarks.io/install/requirements needs to be updated.

@NGPixel
Copy link
Member

NGPixel commented May 1, 2020

The docker image runs on Node.js 12.16.2 and it works just fine, so while upgrading might have fixed your issue, the node version is definitely not the cause.

@sray
Copy link

sray commented May 1, 2020

@Alexandredc are you sure #1787 and this issue are really the same? I just posted my fix here because you linked these two issues saying they are the same. I looked again into both initial error reports and they are different. I think my issue was the one described in #1787. According to @NGPixel comment, I would say these issues are not the same (different error messages).

@AlexandreDeCarli
Copy link

AlexandreDeCarli commented May 5, 2020

These errors occur on Linux, MacOS, Windows.
Each platform shows errors in different ways, but the 3 errors have the same apparent cause: "loader.js" and "wiki 2.3.77"

@sray
Copy link

sray commented May 11, 2020

@NGPixel that's interesting. Two people in the #1787 confirmed, that a nodejs upgrade fixed the problem for them as well. Which version of nanoid is used in the dockr image? If you dive a bit into ai/nanoid#206, you will also find uuidjs/uuid#428 and aws/aws-cdk#7816. In aws/aws-cdk#7816 they observe their specific import problem only from nodejs version 13.0.0 onwards, which would explain why with nodejs 12.16.2 the problem does not appear.

@NGPixel
Copy link
Member

NGPixel commented Jun 2, 2020

Added a note in the docs about Node.js 13.0 to 13.2 not being supported because of the ESM bug.

On another note, the 13.x release has reached its end-of-life and is no longer supported anyway.

@NGPixel NGPixel closed this as completed Jun 2, 2020
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

4 participants