- Node.js Version: v14.17.3
- OS: Fedora 34 (Workstation Edition) x86_64
- Scope (install, code, runtime, meta, other?):
node init
Just tried to initialize node at local directory
❯ node init
internal/modules/cjs/loader.js:905
throw err;
^
Error: Cannot find module '/home/searge/Dev/Learn/GoIT/Webpack/init'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:902:15)
at Function.Module._load (internal/modules/cjs/loader.js:746:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
❯ nvm list
-> v14.17.3
default -> lts/* (-> v14.17.3)
❯ npm -v
7.19.1
First, I have installed n version manager with same problem, so I've installed nvm, but error the same.
I am sure there is no such command
node init, you can't init node as it is already installed on your system. You might need to usenpm initornpm ito initialise thepackage.json;npm init <initializer>can be used to set up a new or existing npm package.initializerin this case is an npm package namedcreate-<initializer>, which will be installed bynpm-exec, and then have its main bin executed -- presumably creating or updating package.json and running any other initialization-related operationsFor more details check npm docs.