$ mvn чистая установка -PautoInstallSinglePackage

#aem

Вопрос:

«[ИНФОРМАЦИЯ] Двоичный файл, найденный по адресу C:Usersmusalcodeaem-guides-wkndui.интерфейсnode_modulesnode-sassпоставщикwin32-x64-64привязка.узел [ИНФОРМАЦИЯ] Тестирование двоичного файла [ИНФОРМАЦИЯ] Двоичный файл в порядке [ПРЕДУПРЕЖДЕНИЕ] npm ПРЕДУПРЕЖДАЕТ о НЕОБЯЗАТЕЛЬНОМ ПРОПУСКЕ НЕОБЯЗАТЕЛЬНОЙ ЗАВИСИМОСТИ: fseven»

Я следую этому учебному пособию : https://experienceleague.adobe.com/docs/experience-manager-learn/getting-started-wknd-tutorial-develop/project-setup.html?lang=en#build

 [INFO] Binary found at C:Usersmusalcodeaem-guides-wkndui.frontendnode_modulesnode-sassvendorwin32-x64-64binding.node
[INFO] Testing binary
[INFO] Binary is fine
[WARNING] npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.3.1 (node_moduleschokidarnode_modulesfsevents):
[INFO] added 1150 packages from 604 contributors in 126.591s
[WARNING] npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
[WARNING] npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_moduleswatchpack-chokidar2node_moduleschokidarnode_modulesfsevents):
[WARNING] npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
[WARNING] npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_moduleswebpack-dev-servernode_moduleschokidarnode_modulesfsevents):
[WARNING] npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
[ERROR]
[INFO] 
[INFO] --- frontend-maven-plugin:1.7.6:npm (npm run prod) @ aem-guides-wknd.ui.frontend ---
[INFO] Running 'npm run prod' in C:Usersmusalcodeaem-guides-wkndui.frontend
[INFO] 
[INFO] > aem-maven-archetype@1.0.0 prod C:Usersmusalcodeaem-guides-wkndui.frontend
[INFO] > webpack -p --config ./webpack.prod.js amp;amp; clientlib --verbose
[INFO]
[INFO] Hash: ffc73eaa92aecbde036f
[INFO] Version: webpack 4.46.0
[INFO] Time: 6708ms
[INFO] Built at: 03/18/2021 1:14:42 AM
[INFO]  1 asset
[INFO] Entrypoint site = clientlib-site/site.js
[INFO]
[INFO] WARNING in ./src/main/webpack/site/main.ts
[INFO] Module Warning (from (webpack)-import-glob-loader/index.js):
[INFO] (Emitted value instead of an instance of Error) Empty results for "import "./**/*.js""
[INFO] NonErrorEmittedError: (Emitted value instead of an instance of Error) Empty results for "import "./**/*.js""
[INFO]     at Object.emitWarning (C:Usersmusalcodeaem-guides-wkndui.frontendnode_moduleswebpacklibNormalModule.js:160:16)
[INFO]     at replacer (C:Usersmusalcodeaem-guides-wkndui.frontendnode_moduleswebpack-import-glob-loaderindex.js:85:12)
[INFO]     at String.replace (<anonymous>)
[INFO]     at Object.module.exports (C:Usersmusalcodeaem-guides-wkndui.frontendnode_moduleswebpack-import-glob-loaderindex.js:91:20)
[INFO]
[INFO] ERROR in ./src/main/webpack/site/main.scss
[INFO] Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
[INFO] ModuleBuildError: Module build failed (from ./node_modules/postcss-loader/src/index.js):
[INFO] BrowserslistError: C:Usersmusalcodeaem-guides-wkndui.frontend contains both browserslist and package.json with browsers
[INFO]     at C:Usersmusalcodeaem-guides-wkndui.frontendnode_modulesbrowserslistnode.js:329:15
[INFO]     at eachParent (C:Usersmusalcodeaem-guides-wkndui.frontendnode_modulesbrowserslistnode.js:49:18)
[INFO]     at Object.findConfig (C:Usersmusalcodeaem-guides-wkndui.frontendnode_modulesbrowserslistnode.js:305:20)
[INFO]     at Function.loadConfig (C:Usersmusalcodeaem-guides-wkndui.frontendnode_modulesbrowserslistnode.js:223:37)
[INFO]     at browserslist (C:Usersmusalcodeaem-guides-wkndui.frontendnode_modulesbrowserslistindex.js:411:31)
[INFO]     at Browsers.parse (C:Usersmusalcodeaem-guides-wkndui.frontendnode_modulesautoprefixerlibbrowsers.js:63:12)
[INFO]     at new Browsers (C:Usersmusalcodeaem-guides-wkndui.frontendnode_modulesautoprefixerlibbrowsers.js:46:26)
[INFO]     at loadPrefixes (C:Usersmusalcodeaem-guides-wkndui.frontendnode_modulesautoprefixerlibautoprefixer.js:98:20)
[INFO]     at plugin (C:Usersmusalcodeaem-guides-wkndui.frontendnode_modulesautoprefixerlibautoprefixer.js:109:20)
[ERROR] npm ERR! code ELIFECYCLE
[INFO]     at LazyResult.run (C:Usersmusalcodeaem-guides-wkndui.frontendnode_modulespostcssliblazy-result.js:288:14)
[ERROR] npm ERR! errno 2
[ERROR] npm ERR! aem-maven-archetype@1.0.0 prod: `webpack -p --config ./webpack.prod.js amp;amp; clientlib --verbose`
[INFO]     at LazyResult.asyncTick (C:Usersmusalcodeaem-guides-wkndui.frontendnode_modulespostcssliblazy-result.js:212:26)
[ERROR] npm ERR! Exit status 2
[INFO]     at C:Usersmusalcodeaem-guides-wkndui.frontendnode_modulespostcssliblazy-result.js:254:14
[ERROR] npm ERR!
[INFO]     at new Promise (<anonymous>)
[ERROR] npm ERR! Failed at the aem-maven-archetype@1.0.0 prod script.
[INFO]     at LazyResult.async (C:Usersmusalcodeaem-guides-wkndui.frontendnode_modulespostcssliblazy-result.js:250:23)
[ERROR] npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
[INFO]     at LazyResult.then (C:Usersmusalcodeaem-guides-wkndui.frontendnode_modulespostcssliblazy-result.js:131:17)
[ERROR]
[INFO]     at Promise.resolve.then.then (C:Usersmusalcodeaem-guides-wkndui.frontendnode_modulespostcss-loadersrcindex.js:142:8)
[ERROR] npm ERR! A complete log of this run can be found in:
[INFO]     at runLoaders (C:Usersmusalcodeaem-guides-wkndui.frontendnode_moduleswebpacklibNormalModule.js:316:20)
[ERROR] npm ERR!     C:UsersmusalAppDataRoamingnpm-cache_logs2021-03-18T06_14_42_492Z-debug.log
[INFO]     at C:Usersmusalcodeaem-guides-wkndui.frontendnode_modulesloader-runnerlibLoaderRunner.js:367:11
[INFO]     at C:Usersmusalcodeaem-guides-wkndui.frontendnode_modulesloader-runnerlibLoaderRunner.js:233:18
[INFO]     at context.callback (C:Usersmusalcodeaem-guides-wkndui.frontendnode_modulesloader-runnerlibLoaderRunner.js:111:13)
[INFO]     at Promise.resolve.then.then.catch (C:Usersmusalcodeaem-guides-wkndui.frontendnode_modulespostcss-loadersrcindex.js:208:9)
[INFO]  @ ./src/main/webpack/site/main.ts 1:0-21
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for aem-guides-wknd 0.0.1-SNAPSHOT:
[INFO]
[INFO] aem-guides-wknd .................................... SUCCESS [ 10.794 s]
[INFO] WKND Sites Project - Core .......................... SUCCESS [02:21 min]
[INFO] WKND Sites Project - UI Frontend ................... FAILURE [03:17 min]
[INFO] WKND Sites Project - Repository Structure Package .. SKIPPED
[INFO] WKND Sites Project - UI apps ....................... SKIPPED
[INFO] WKND Sites Project - UI content .................... SKIPPED
[INFO] WKND Sites Project - UI config ..................... SKIPPED
[INFO] WKND Sites Project - All ........................... SKIPPED
[INFO] WKND Sites Project - Integration Tests ............. SKIPPED
[INFO] WKND Sites Project - Dispatcher .................... SKIPPED
[INFO] WKND Sites Project - UI Tests ...................... SKIPPED
[INFO] WKND Sites Project - Project Analyser .............. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  10:06 min
[INFO] Finished at: 2021-03-18T01:14:42-05:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.7.6:npm (npm run prod) on project aem-guides-wknd.ui.frontend: Failed to run task: 'npm run prod' failed. org.apache.commons.exec.ExecuteException: Process exited with an error: 2 (Exit value: 2) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <args> -rf :aem-guides-wknd.ui.frontend
 

Ответ №1:

Похоже, вы могли получить эту ошибку по 2 основным причинам:

  1. Ваши модули npm устарели и устарели:

Решение : Очистите node_модули и повторите попытку npm install . Если это не сработает, попробуйте : npm install --global npm

  1. Ваша ОС отличается от ОС, из которой вы получили код.

Решение: удаление файла .browserslistrc должно сработать.