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

Docusaurus2: Error when create project #1601

Closed
rccclr opened this issue Jun 12, 2019 · 3 comments · Fixed by #1655
Closed

Docusaurus2: Error when create project #1601

rccclr opened this issue Jun 12, 2019 · 3 comments · Fixed by #1655

Comments

@rccclr
Copy link

rccclr commented Jun 12, 2019

🐛 Bug Report

Please help with this error.

npx @docusaurus/core@next init
internal/modules/cjs/loader.js:626
throw err;
^

Error: Cannot find module '/root/.npm/_npx/26615/lib/node_modules/@docusaurus/core/node_modules/core-js-pure/scripts/postinstall'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:623:15)
at Function.Module._load (internal/modules/cjs/loader.js:527:27)
at Function.Module.runMain (internal/modules/cjs/loader.js:837:10)
at internal/main/run_main_module.js:17:11 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
? What should we name this site? website
? Select a template below... classic

Creating new Docusaurus project ...

Installing dependencies with: npm

@endiliey
Copy link
Contributor

Can you send a screencast ? Its hard for us to reproduce locally. It could be a transient issue, try again the command or make sure u have admin access ?

From the log it seems to be some core-js postinstall problem ? hmm

@rccclr
Copy link
Author

rccclr commented Jun 14, 2019

Hello

With this Dockerfile for reproduce.

Many thanks

Dockerfile

FROM ubuntu:18.04

RUN apt-get update &&
apt-get install -y build-essential &&
apt-get install -y byobu curl git htop man unzip vim wget &&
apt-get install -y curl gnupg2 &&
curl -sL https://deb.nodesource.com/setup_12.x | bash - &&
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - &&
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list &&
apt-get install -y nodejs &&
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - &&
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list &&
apt update && apt install yarn

image

@endiliey
Copy link
Contributor

Seems like a bug from core-js postinstall script

I think one of our dependency depends on it (most likely babel). Its an indirect dependency

zloirock/core-js#551

PR welcome for this issue

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

Successfully merging a pull request may close this issue.

2 participants