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

Платформа не запускается локально #143

Closed
skorobaeus opened this issue May 21, 2021 · 2 comments
Closed

Платформа не запускается локально #143

skorobaeus opened this issue May 21, 2021 · 2 comments
Assignees
Labels
ошибка Что-то критичное и мешает

Comments

@skorobaeus
Copy link
Member

Всё работало нормально, но сегодня я сделала git pull :) И вот что происходит:

$ npm start

> start
> eleventy --serve --quiet

Eleventy fatal error: (more in DEBUG output)
> Error in your Eleventy config file 'T:/Doka/new-site/platform/.eleventy.js'. You may need to run `npm install`.

`EleventyConfigError` was thrown
> Cannot find module 'markdown-it-anchor'
Require stack:
- T:\Doka\new-site\platform\.eleventy.js
- T:\Doka\new-site\platform\node_modules\@11ty\eleventy\src\TemplateConfig.js
- T:\Doka\new-site\platform\node_modules\@11ty\eleventy\src\Config.js
- T:\Doka\new-site\platform\node_modules\@11ty\eleventy\src\TemplateEngineManager.js
- T:\Doka\new-site\platform\node_modules\@11ty\eleventy\src\EleventyExtensionMap.js
- T:\Doka\new-site\platform\node_modules\@11ty\eleventy\src\TemplateRender.js
- T:\Doka\new-site\platform\node_modules\@11ty\eleventy\src\TemplateData.js
- T:\Doka\new-site\platform\node_modules\@11ty\eleventy\src\Eleventy.js
- T:\Doka\new-site\platform\node_modules\@11ty\eleventy\cmd.js

`Error` was thrown:
    Error: Cannot find module 'markdown-it-anchor'
    Require stack:
    - T:\Doka\new-site\platform\.eleventy.js
    - T:\Doka\new-site\platform\node_modules\@11ty\eleventy\src\TemplateConfig.js
    - T:\Doka\new-site\platform\node_modules\@11ty\eleventy\src\Config.js
    - T:\Doka\new-site\platform\node_modules\@11ty\eleventy\src\TemplateEngineManager.js
    - T:\Doka\new-site\platform\node_modules\@11ty\eleventy\src\EleventyExtensionMap.js
    - T:\Doka\new-site\platform\node_modules\@11ty\eleventy\src\TemplateRender.js
    - T:\Doka\new-site\platform\node_modules\@11ty\eleventy\src\TemplateData.js
    - T:\Doka\new-site\platform\node_modules\@11ty\eleventy\src\Eleventy.js
    - T:\Doka\new-site\platform\node_modules\@11ty\eleventy\cmd.js
        at Function.Module._resolveFilename (internal/modules/cjs/loader.js:885:15)
        at Function.Module._load (internal/modules/cjs/loader.js:730:27)
        at Module.require (internal/modules/cjs/loader.js:957:19)
        at require (internal/modules/cjs/helpers.js:88:18)
        at Object.<anonymous> (T:\Doka\new-site\platform\.eleventy.js:10:26)
        at Module._compile (internal/modules/cjs/loader.js:1068:30)
        at Object.Module._extensions..js (internal/modules/cjs/loader.js:1097:10)
        at Module.load (internal/modules/cjs/loader.js:933:32)
        at Function.Module._load (internal/modules/cjs/loader.js:774:14)
        at Module.require (internal/modules/cjs/loader.js:957:19)

Делаю npm install, как он и предлагает:

$ npm install
npm ERR! code EBADENGINE
npm ERR! engine Unsupported engine
npm ERR! engine Not compatible with your version of node/npm: undefined
npm ERR! notsup Not compatible with your version of node/npm: undefined
npm ERR! notsup Required: {"node":"14.x","npm":"6.x"}
npm ERR! notsup Actual:   {"npm":"7.14.0","node":"v14.17.0"}

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\wizzz\AppData\Local\npm-cache\_logs\2021-05-21T09_35_32_972Z-debug.log

Версии такие:

$ node -v
v14.17.0

$ npm -v
7.14.0

Ось вин 10.

@furtivite furtivite added the ошибка Что-то критичное и мешает label May 21, 2021
@furtivite
Copy link
Member

Кажется, основная проблема в 7-й версии NPM. Платформа работает на 6-й.

@furtivite
Copy link
Member

Проблема решилась откатом до 6-й версии npm. Это можно сделать командой:

npm install -g npm@6.14.12

где 6.14.12 уточнение какая шестая версия подходит. Она может быть другая, главное, шестая.

Затем нужно установить зависимости и собрать платформу:

npm ci && npm start

@furtivite furtivite self-assigned this May 21, 2021
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

2 participants