Stanislava
Stanislava

Reputation: 91

Cannot find module 'jasmine-reporters'

My 'npm' folder is in D:\Box folder because I don't have space on C. I configure Protractor to work by adding in System Environment Variables new environment variable named PROTRACTOR with value: . Then in System Path I've entered: %PROTRACTOR%\bin

And this works for Protractor perfectly.

Now I want to add jasmine-reporters and I paste in npm\node_modules\jasmine-node\node_modules 'jasmine-reporters' and 'jasmine-growl-reporter' folders. Then run one test with jasmine report in conf.js and I see error message:

Cannot find module 'jasmine-reporters'.

What I try:

  1. Paste 'jasmine-reporters' and 'jasmine-growl-reporter' folders in npm\node_modules
  2. Add in System Environment Variables NODE_PATH: D:\Box\npm\node_modules

The result is the same. Someone, please help me with this issue.

Upvotes: 1

Views: 6499

Answers (2)

Adnan Shafiq
Adnan Shafiq

Reputation: 131

Go to C:\Users\username\AppData\Roaming\npm\node_modules -Remove jasmine-reporters

Go to C:\Users\username\AppData\Roaming -Remove npm-Cache

Reinstall jasmine-reporter and npm

Upvotes: 0

kyrisu
kyrisu

Reputation: 4643

If you want to keep your global node_modules on the D:\ drive you need to change prefix in npm config as described in npm docs

Short version (in command prompt as administrator):

npm config set prefix d:\box

To see what is the current path you can issue:

npm config get prefix

Upvotes: 1

Related Questions