2
votes

Im having an issue using protractor and cucumber. My new job requires this so I dont have another option. Please dont refer me to a different framework.

The sad thing is, after several days of trying to solve install errors, I thought I was ready to start using it.

Windows 10

The error reads as follows....

[launcher] Error: TypeError: Cannot read property 'strict' of undefined at C:\Users\Aaron\node_modules\protractor-cucumber-framework\index.js:20:43 at _fulfilled (C:\Users\Aaron\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:834:54) at self.promiseDispatch.done (C:\Users\Aaron\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:863:30) at Promise.promise.promiseDispatch (C:\Users\Aaron\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:796:13) at C:\Users\Aaron\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:556:49 at runSingle (C:\Users\Aaron\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:137:13) at flush (C:\Users\Aaron\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:125:13) at nextTickCallbackWith0Args (node.js:415:9) at process._tickCallback (node.js:344:13) [launcher] Process exited with error code 100

http://screencast.com/t/ikYao7KG enter image description here

1
Can you show us the test code?nilesh
Do you have a 'use strict'; at the top of your javascript file?martin770

1 Answers

1
votes

I wanted to follow up on my old question.

Although Im not sure what caused this, I did figure out how to solve it and have theories on what it could have been.

Solution:

  1. Reinstall dependencies, but don't install them globally. -> do not use "-g"
  2. Ensure node is up-to-date.
  3. Restart computer.
  4. Ensure everything is installed locally to that project. <- I find this to be the most important one.

Theory:

I like the idea of global installs. "If something is good enough to use in multiple projects, why not globally install them?" was the original thought. This is wrong. Installing globally has the "-g" trailing behind the install command. Local install does not have the "-g."

If you ever wanted to sell work or transfer work to a new computer, how could you when you could have a virtually endless amount of dependencies all over your comp.

BUT, as a side-note, there were atleast two dependencies that required a restart and did not prompt me at all, after the npm install method.

Very frustrating. In the end, this is only a theory and no longer an issue. But after having to follow the same process five times, I now have a process for this. Hope this helps someone.