I have a directory that looks like so
/foo
yep it's an empty folder, I want to run
cd foo && npm install bar
however npm is complaining that there is no package.json file in the foo directory.
Is there a bonafide reliable way to install a depedency into a directory if there is no package.json file there (yet)?
Turns out, it was just a warning, not a error, I misread, it says:
npm WARN enoent ENOENT: no such file or directory, open '/home/olegzandr/.suman/package.json'
I guess my question then becomes, is there a way to tell NPM to ignore a missing package.json file?
npm pack foo
is the way to go? – Alexander Millsrm -r -f ./node_modules/PACKAGE_NAME && mkdir -p ./node_modules/ && npm pack PACKAGE_NAME | xargs tar -C /var/www/node/ork/node_modules -xzf && mv ./node_modules/package ./node_modules/PACKAGE_NAME && rm PACKAGE_NAME *.tgz
:) – stdob--