'node_modules' is not recognized as an internal or external command, operable program or batch file.
jkalandarov opened this issue · comments
Hi,
I just cloned the project and tried to run the test. The following error occured on the terminal:
$ npm test
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
> mailosaur@8.0.0 test
> npm run lint && npm run tsc && node_modules/.bin/_mocha -t 60000
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
> mailosaur@8.0.0 lint
> node_modules/.bin/eslint --ext .js .
'node_modules' is not recognized as an internal or external command,
operable program or batch file.
Node.js in listed in PATH and environment variables.
Hi @jkalandarov, can you confirm what version of Node you're using on your machine? We cannot reproduce this with 16.14.2
.
Have you also run npm install
first (before running npm test
)?
I ran npm install
right after cloning the project. Node version: 16.16.0
.
Ok, within the base directory can you run the following two commands, and confirm if either (or both) of them give you can error?
node_modules/.bin/eslint --ext .js .
$(npm bin)/eslint --ext .js .
node_modules/.bin/eslint --ext .js .
did nothing.
$(npm bin)/eslint --ext .js .
returned No such file or directory
So if you look at the scripts
section from package.json you'll see that it is this same command (node_modules/.bin/eslint --ext .js .
) that's being run - the fact that nothing is returned is good (it means its running, and no lint was found).
Its also the point at which you should have seen node_modules is not recognised
based on your original query.
I've just tried again on a fresh machine, with the following commands (in an empty directory) and cannot reproduce this unfortunately:
cd /tmp
git clone https://github.com/mailosaur/mailosaur-node
cd mailosaur-node
npm i
npm test
Without any way of reproducing this I'm struggling with how best to help out. You could try editing the package.json
file (perhaps prefixing node_modules
as ./node_modules
)
EDIT: Just to confirm also, you should only need to do this if you're actively trying to develop/contribute to the library itself - is that something you're trying to do, or do just want to start testing with Mailosaur itself? If the latter, just checkout our getting started docs here: http://mailosaur.com/docs/languages/nodejs/