on 2023 Sep 11 1:10 PM
"Cannot find module" error causing SAP Commerce Cloud 2211 failed to be installed locally while building using ant clean all. How to fix this? Please help.
[echo] building extension 'smartedittools'...
[echo] fixing node/npm symlinks and permissions
[echo] Running [npm config set update-notifier false]
[echo]
[echo] Running [npm config get registry]
[echo] https://registry.npmjs.org/
[echo] extensionsEnabled: personalizationsmartedit.smartedittools.config=true
[echo] merchandisingsmartedit.smartedittools.config=true
[echo] smartedit.smartedittools.config=yes
[echo] personalizationsearchsmartedit.smartedittools.config=true
[echo] personalizationpromotionssmartedit.smartedittools.config=true
[echo] cmssmartedit.smartedittools.config=true
[echo] extensionsPaths: ${ext.personalizationsmartedit.path},${ext.merchandisingsmartedit.path},${ext.smartedit.path},${ext.personalizationsearchsmartedit.path},${ext.personalizationpromotionssmartedit.path},${ext.cmssmartedit.path},
[echo] Running [node C:\Users\2210084\Downloads\Commerce sap\hybris\bin\modules\smartedit\smartedittools\apps\smartedit-scripts\scripts\link-smartedit-project.js C:\Users\2210084\Downloads\Commerce sap\hybris\bin\modules\personalization\personalizationsmartedit,C:\Users\2210084\Downloads\Commerce sap\hybris\bin\modules\cds-merchandising\merchandisingsmartedit,C:\Users\2210084\Downloads\Commerce sap\hybris\bin\modules\smartedit\smartedit,C:\Users\2210084\Downloads\Commerce sap\hybris\bin\modules\personalization-search\personalizationsearchsmartedit,C:\Users\2210084\Downloads\Commerce sap\hybris\bin\modules\personalization-promotion\personalizationpromotionssmartedit,C:\Users\2210084\Downloads\Commerce sap\hybris\bin\modules\smartedit\cmssmartedit, C:\Users\2210084\Downloads\Commerce sap\hybris\bin\modules\smartedit\smartedittools true]
[exec] node:internal/modules/cjs/loader:1029
[exec] throw err;
[exec] ^
[exec]
[exec] Error: Cannot find module 'C:\Users\2210084\Downloads\Commerce'
[exec] at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1026:15)
[exec] at Function.Module._load (node:internal/modules/cjs/loader:871:27)
[exec] at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
[exec] at node:internal/main/run_main_module:22:47 {
[exec] code: 'MODULE_NOT_FOUND',
[exec] requireStack: []
[exec] }
BUILD FAILED
C:\Users\2210084\Downloads\Commerce sap\hybris\bin\platform\build.xml:13: The following error occurred while executing this line:
C:\Users\2210084\Downloads\Commerce sap\hybris\bin\platform\resources\ant\compiling.xml:95: The following error occurred while executing this line:
C:\Users\2210084\Downloads\Commerce sap\hybris\bin\platform\resources\ant\compiling.xml:153: The following error occurred while executing this line:
C:\Users\2210084\Downloads\Commerce sap\hybris\bin\platform\resources\ant\util.xml:13: The following error occurred while executing this line:
C:\Users\2210084\Downloads\Commerce sap\hybris\bin\platform\resources\ant\compiling.xml:160: The following error occurred while executing this line:
C:\Users\2210084\Downloads\Commerce sap\hybris\bin\platform\resources\ant\compiling.xml:289: The following error occurred while executing this line:
C:\Users\2210084\Downloads\Commerce sap\hybris\bin\platform\resources\ant\util.xml:142: The following error occurred while executing this line:
C:\Users\2210084\Downloads\Commerce sap\hybris\bin\modules\smartedit\smartedittools\buildcallbacks.xml:162: The following error occurred while executing this line:
C:\Users\2210084\Downloads\Commerce sap\hybris\bin\modules\smartedit\smartedittools\buildcallbacks.xml:74: The following error occurred while executing this line:
C:\Users\2210084\Downloads\Commerce sap\hybris\bin\modules\npm-ancillary\npmancillary\buildcallbacks.xml:96: exec returned: 1
Request clarification before answering.
Dear rmaswin,
I also agree with what Gaurav suggested. It's well-known that spaces in file paths can occasionally cause issues when executing specific commands. You have a couple of options: either eliminate the spaces from the path if possible, or if that's not a viable solution, you should consider modifying your build scripts to effectively manage paths that include spaces by enclosing the paths in quotation marks or utilizing escape characters as needed.
Regards,
H.V.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Aswin,
When there are spaces in the directory path, this error frequently happens because it might affect how the command-line tools perceive the routes.
SO, you could use SAP commerce folder name as "Commerce-sap" instead of "Commerce sap"
Thanks,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
21 | |
16 | |
3 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.