DEV Community

[Comment from a deleted post]
Collapse
 
syn profile image
norman

I followed tutorials but they dont work. I put the header #! into it and add the bin. I dont know how to test if it works without publishing it, so i published it. It doesnt work and gives this error.

C:\Users\namar\OneDrive\Desktop\memedl>npm i -g subscrapetest
npm ERR! code ENOENT
npm ERR! syscall chmod
npm ERR! path C:\Users\namar\AppData\Roaming\npm\node_modules\subscrapetest\node subscrape.js
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, chmod 'C:\Users\namar\AppData\Roaming\npm\node_modules\subscrapetest\node subscrape.js'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\namar\AppData\Roaming\npm-cache\_logs\2020-02-13T22_11_56_826Z-debug.log```

Collapse
 
ccleary00 profile image
Corey Cleary

In your folder structure, where is the subscrape.js file located?

Collapse
 
syn profile image
norman

Desktop/subscrape/subscrape.js

 
ccleary00 profile image
Corey Cleary

You have some path problem... are you using a bin script here? if so, is it defined in your package.json? What does the package.json look like?

 
syn profile image
norman

I just had to install Windows yesterday. I'm not home right now to show you the package.json