Open zubair1103 opened 1 year ago
I encountered the same problem.
Same Error Windows 11 -> WSL 2 -> Ubuntu 22.04.2
`Error: Cannot find module 'is-ci' Require stack:
Same Error Windows 11 -> WSL 2 -> Ubuntu 22.04.2
`Error: Cannot find module 'is-ci' Require stack:
- /root/.nvm/versions/node/v18.16.0/lib/node_modules/yo/node_modules/update-notifier/index.js
- /root/.nvm/versions/node/v18.16.0/lib/node_modules/yo/lib/cli.js at Module._resolveFilename (node:internal/modules/cjs/loader:1075:15) at Module._load (node:internal/modules/cjs/loader:920:27) at Module.require (node:internal/modules/cjs/loader:1141:19) at require (node:internal/modules/cjs/helpers:110:18) at lazy (/root/.nvm/versions/node/v18.16.0/lib/node_modules/yo/node_modules/import-lazy/index.js:2:51) at /root/.nvm/versions/node/v18.16.0/lib/node_modules/yo/node_modules/import-lazy/index.js:10:11 at new UpdateNotifier (/root/.nvm/versions/node/v18.16.0/lib/node_modules/yo/node_modules/update-notifier/index.js:46:4) at module.exports (/root/.nvm/versions/node/v18.16.0/lib/node_modules/yo/node_modules/update-notifier/index.js:183:25) at updateCheck (/root/.nvm/versions/node/v18.16.0/lib/node_modules/yo/lib/cli.js:54:20) at Object. (/root/.nvm/versions/node/v18.16.0/lib/node_modules/yo/lib/cli.js:187:1) { code: 'MODULE_NOT_FOUND', requireStack: [ '/root/.nvm/versions/node/v18.16.0/lib/node_modules/yo/node_modules/update-notifier/index.js', '/root/.nvm/versions/node/v18.16.0/lib/node_modules/yo/lib/cli.js' ] }`
I have the same error in win 10, wsl2
Same Error. Win10 WSL2 Ubuntu 22.04.2 Node 18.16.0 npm 9.5.1
I encountered the same error. Win 11, WSL2, Ubuntu 22.04.2, Node 18.16.0, npm 9.5.1
bumpty bump bump. Win 11, WSL2, Ubuntu 22.04.2, Node 20.5.0, npm 9.8.1
edit: found the issue to be the root user login - ie. I was logging into the WSL2/Ubuntu container as root. Added myself as as user and set that to the default login and yo performs as expected.
Running into the same problem on Ubuntu (no WSL):
root@host:/opt/ppp/TEST# yo
node:internal/modules/cjs/loader:1147
throw err;
^
Error: Cannot find module 'is-ci'
Require stack:
- /root/.nvm/versions/node/v20.11.0/lib/node_modules/yo/node_modules/update-notifier/index.js
- /root/.nvm/versions/node/v20.11.0/lib/node_modules/yo/lib/cli.js
at Module._resolveFilename (node:internal/modules/cjs/loader:1144:15)
at Module._load (node:internal/modules/cjs/loader:985:27)
at Module.require (node:internal/modules/cjs/loader:1235:19)
at require (node:internal/modules/helpers:176:18)
at lazy (/root/.nvm/versions/node/v20.11.0/lib/node_modules/yo/node_modules/import-lazy/index.js:2:51)
at /root/.nvm/versions/node/v20.11.0/lib/node_modules/yo/node_modules/import-lazy/index.js:10:11
at new UpdateNotifier (/root/.nvm/versions/node/v20.11.0/lib/node_modules/yo/node_modules/update-notifier/index.js:46:4)
at module.exports (/root/.nvm/versions/node/v20.11.0/lib/node_modules/yo/node_modules/update-notifier/index.js:183:25)
at updateCheck (/root/.nvm/versions/node/v20.11.0/lib/node_modules/yo/lib/cli.js:54:20)
at Object.<anonymous> (/root/.nvm/versions/node/v20.11.0/lib/node_modules/yo/lib/cli.js:190:1) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/root/.nvm/versions/node/v20.11.0/lib/node_modules/yo/node_modules/update-notifier/index.js',
'/root/.nvm/versions/node/v20.11.0/lib/node_modules/yo/lib/cli.js'
]
}
If I attempt to run yo as a user:
testuser@host:/opt/ppp/TEST$ yo
Error: Not supported
at init (/usr/local/lib/node_modules/yo/lib/cli.js:122:23)
at pre (/usr/local/lib/node_modules/yo/lib/cli.js:83:9)
at /usr/local/lib/node_modules/yo/lib/cli.js:193:9
at Object.<anonymous> (/usr/local/lib/node_modules/yo/lib/cli.js:194:3)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
node: 20.11.0 npm: 10.2.4 Ubuntu: 20.04 LTS
How, how, how... same issue (almost)
Is there any thought on that?
Thanks.
@mvsenin you should upgrade node to an LTS version. Unsupported versions can be dangerous for your business and your users.
Now this is affecting yo
, but once fixed on our dependencies, it risks appearing on another library. You'll be playing whack a mole with dependencies until you upgrade to an LTS Node version (18 as of now). https://nodejs.org/en/about/previous-releases
@SBoudrias Hi Simon, thanks, I've done that, node version is 20.12.0, but now I'm getting the Error: Cannot find module 'is-ci'...
Did we find a solution to this?
After wasting few days on this, I finally installed it using WSL 2 + Ubuntu + root user then installed Superset in Ubuntu instead of Windows. This way it worked for me.
I am facing the error today on Windows 11.
yo code
Error: Not supported
at init (C:\Users\lucama\AppData\Roaming\npm\node_modules\yo\lib\cli.js:122:23)
at pre (C:\Users\lucama\AppData\Roaming\npm\node_modules\yo\lib\cli.js:83:9)
at C:\Users\lucama\AppData\Roaming\npm\node_modules\yo\lib\cli.js:193:9
at Object.<anonymous> (C:\Users\lucama\AppData\Roaming\npm\node_modules\yo\lib\cli.js:194:3)
at Module._compile (internal/modules/cjs/loader.js:956:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:973:10)
at Module.load (internal/modules/cjs/loader.js:812:32)
at Function.Module._load (internal/modules/cjs/loader.js:724:14)
at Function.Module.runMain (internal/modules/cjs/loader.js:1025:10)
at internal/main/run_main_module.js:17:11
This issue deserves more attention IMO. At the moment the yo
command is unusable on WSL :(
Fresh global instal of yo on wsl 2 with windows 11. run command: yo code
`node:internal/modules/cjs/loader:1147 throw err; ^
Error: Cannot find module 'is-ci' Require stack:
Echoing verikono's comment that installing and using yo from a user other than root fixes this.
I agree that that is a workaround, but I wouldn't consider it a fix. Specially since no other npm packages (that I know) have this issue.
bumpty bump bump. Win 11, WSL2, Ubuntu 22.04.2, Node 20.5.0, npm 9.8.1
edit: found the issue to be the root user login - ie. I was logging into the WSL2/Ubuntu container as root. Added myself as as user and set that to the default login and yo performs as expected.
There is a lot of unknowns in this workaround :-) Would you mind describing (or linking) how to achieve this?
Type of issue
My environment
Ubuntu 22.04.2 LTS (via WSL 2)
v18.16.0
9.5.1
4.3.0
Expected behavior
yo
command should work as normalCurrent behavior
After installing the
yo
globally I tried to runyo
command but it is throwing the error. See shell output below. Error is different for different versions of yo with same steps.Steps to reproduce the behavior
Install
Ubuntu on WSL 2
InstallNVM
InstallNode
InstallYo
Command line output
NOTE:
PLEASE NOTE THAT
Yo 4.3.1
THROWS A DIFFERENT ERROR WHILE PERFORMING SAME STEPS