You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Eventually I installed package globally with sudo npm install --save-dev escape-string-regexp -g that helped with finding the package and resolving previous issue, but effectively coming with the new one:
node:internal/modules/cjs/loader:1126
throw new ERR_REQUIRE_ESM(filename, parentPath, packageJsonPath);
^
Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: /usr/lib/node_modules/escape-string-regexp/index.js
require() of ES modules is not supported.
require() of /usr/lib/node_modules/escape-string-regexp/index.js from /usr/lib/node_modules/hackmyresume/node_modules/chalk/index.js is an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which defines all .js files in that package scope as ES modules.
Instead rename /usr/lib/node_modules/escape-string-regexp/index.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" from /usr/lib/node_modules/escape-string-regexp/package.json.
at new NodeError (node:internal/errors:363:5)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1126:13)
at Module.load (node:internal/modules/cjs/loader:989:32)
at Function.Module._load (node:internal/modules/cjs/loader:829:14)
at Module.require (node:internal/modules/cjs/loader:1013:19)
at require (node:internal/modules/cjs/helpers:93:18)
at Object.<anonymous> (/usr/lib/node_modules/hackmyresume/node_modules/chalk/index.js:2:28)
at Module._compile (node:internal/modules/cjs/loader:1109:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1138:10)
at Module.load (node:internal/modules/cjs/loader:989:32) {
code: 'ERR_REQUIRE_ESM'
}
I'm not proud to admit that resigned of further investigation because I installed fork of hackmyresume that is FluentCV and it works out-of-the-box.
I'm opening this issue because it may be useful for somebody one day and that info may help if any comes up with similar problem.
The text was updated successfully, but these errors were encountered:
At first
hackmyresume new
threw:It was installed with
sudo npm install hackmyresume -g
.I tried solutions:
npm install --save escape-string-regexp
; delete youritem/node_module
and then re-executenpm install
npm install --save-dev escape-string-regexp
npm i -g npm
; delete thenode_modules
folder and runnpm cache clean
and thennpm install
suggested here and here but none of them helped.
Eventually I installed package globally with
sudo npm install --save-dev escape-string-regexp -g
that helped with finding the package and resolving previous issue, but effectively coming with the new one:I'm not proud to admit that resigned of further investigation because I installed fork of
hackmyresume
that is FluentCV and it works out-of-the-box.I'm opening this issue because it may be useful for somebody one day and that info may help if any comes up with similar problem.
The text was updated successfully, but these errors were encountered: