cancel
Showing results for 
Search instead for 
Did you mean: 

"Cannot find module" error while installing SAP commerce. How to fix this? Please help.

Aswin7722
Discoverer
0 Kudos

"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

Accepted Solutions (0)

Answers (2)

Answers (2)

Harish_Vatsa
Active Contributor

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.

gaurav11
Participant
0 Kudos

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,

gaurav11
Participant
0 Kudos

Hi rmaswin

Please let me know, if you still facing the issue?

Thanks,