I was about start learning protractor and following the simple tutorial in there http://www.protractortest.org/#/tutorial
but unfortunately getting weird error after run this command protractor conf.js
[launcher] Process exited with error code 1
/usr/local/lib/node_modules/protractor/node_modules/q/q.js:126
throw e;
SyntaxError: Unexpected token )
at goog.loadModuleFromSource_ (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/base.js:1123:19)
at Object.goog.loadModule (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/base.js:1085:46)
at /usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:1:6
at Object.Context.closure.goog.retrieveAndExecModule_ (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/_base.js:135:8)
at <anonymous>:1:6
at Context.closure.closure.vm.createContext.CLOSURE_IMPORT_SCRIPT (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/_base.js:104:12)
at Object.goog.importScript_ (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/base.js:879:9)
at Object.goog.importModule_ (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/base.js:900:14)
at Object.goog.writeScripts_ (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/base.js:1323:16)
at Object.goog.require (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/base.js:663:14)
node version : v0.10.37
java version : 1.8.0_66
protractor : Version 3.0.0
jadmine : jasmine v2.3.2 jasmine-core v2.3.4
UPDATE
already clone the repository https://github.com/angular/protractor
run following command
./bin/webdriver-manager update --standalone
./bin/webdriver-manager start
open new terminal tab
change to website direcotry
run the website folder using npm start and the website already running on port 8080
open new terminal tab, still under website folder
run test command npm test then chrome browser open up in a few second
and show same error above
Protractor upgraded to WebDriver 2.48.2 with their release of version 3.0.0. This version of WebDriver is not compatible with Node.js versions < 4.
From CHANGELOG.md in the Protractor project:
(18e1f71) chore(webdriver): upgrade Protractor to webdriver 2.48.2
BREAKING CHANGE:
1) Users will no longer be able to use node versions < 4.
2) There are significant changes to the control flow, and tests may need to be modified to be compliant with the new control flow. See Changes
Downgrading Protractor to 2.5.1 or upgrading Node.js to >= v4.0.0 should solve your problem. See here for more info on breaking changes in Protractor v3.0.0.
Related
I am writing an Electron application and would like to integrate my AI. For this I have installed #tensorflow/tfjs-node version 3.0.0. When I want to execute my code (const tf = require("#tensorflow/tfjs-node");) the following error message appears in the console:
Uncaught (in promise) Error: The Node.js native addon module (tfjs_binding.node) can not be found at path: C:\...\simplePhishNew\node_modules\#tensorflow\tfjs-node\lib\napi-v6\tfjs_binding.node.
Please run command 'npm rebuild #tensorflow/tfjs-node build-addon-from-source' to rebuild the native addon module.
The Console is tell me:
node-pre-gyp info This Node instance does not support builds for N-API version 7
The Solution,
Please run command 'npm rebuild #tensorflow/tfjs-node build-addon-from-source' to rebuild the native addon module.
doesnt work and is showing the following error message.
CPU-windows-3.0.0.zip
* Building TensorFlow Node.js bindings
symlink ./lib/napi-v7 failed: null
#tensorflow/tfjs-node#3.0.0 C:\...\node_modules\#tensorflow\tfjs-node
Thanks for the effort
I did it guys...
Step 1:
Stop crying
Step 2:
Call the boss again and take back the notice of termination
Step 3:
Electron need a specific node version
https://github.com/electron/releases
For example Electron v. 11.3.0 needs node 12.18.3
Step 4:
Ask yourself why you actually got the job
I have this error when I run npm run dev or npm run watch and I didn't find what is the mess. It's happens in a all fresh Laravel 8 app.
It looks like happen when I use the developement command
ERROR in ./resources/css/app.css
Module build failed (from ./node_modules/css-loader/index.js):
ModuleBuildError: Module build failed (from ./node_modules/postcss-loader/src/index.js):
TypeError: [(...variantsValue),(...extensions)].flat is not a function
at /var/www/html/smart_recipe/node_modules/tailwindcss/lib/util/resolveConfig.js:219:73
at baseMergeDeep (/var/www/html/smart_recipe/node_modules/lodash/_baseMergeDeep.js:42:7)
at /var/www/html/smart_recipe/node_modules/lodash/_baseMerge.js:27:7
at /var/www/html/smart_recipe/node_modules/lodash/_createBaseFor.js:17:11
at baseMerge (/var/www/html/smart_recipe/node_modules/lodash/_baseMerge.js:24:3)
at /var/www/html/smart_recipe/node_modules/lodash/mergeWith.js:36:3
at /var/www/html/smart_recipe/node_modules/lodash/_createAssigner.js:30:9
at apply (/var/www/html/smart_recipe/node_modules/lodash/_apply.js:15:25)
at /var/www/html/smart_recipe/node_modules/lodash/_overRest.js:32:12
at mergeVariantExtensions (/var/www/html/smart_recipe/node_modules/tailwindcss/lib/util/resolveConfig.js:218:33)
at resolveVariants (/var/www/html/smart_recipe/node_modules/tailwindcss/lib/util/resolveConfig.js:235:10)
at resolveConfig (/var/www/html/smart_recipe/node_modules/tailwindcss/lib/util/resolveConfig.js:271:15)
at /var/www/html/smart_recipe/node_modules/tailwindcss/lib/index.js:77:37
at /var/www/html/smart_recipe/node_modules/tailwindcss/lib/processTailwindFeatures.js:52:20
at LazyResult.run (/var/www/html/smart_recipe/node_modules/postcss/lib/lazy-result.js:288:14)
at LazyResult.asyncTick (/var/www/html/smart_recipe/node_modules/postcss/lib/lazy-result.js:212:26)
at LazyResult.asyncTick (/var/www/html/smart_recipe/node_modules/postcss/lib/lazy-result.js:225:14)
at /var/www/html/smart_recipe/node_modules/postcss/lib/lazy-result.js:217:17
at runLoaders (/var/www/html/smart_recipe/node_modules/webpack/lib/NormalModule.js:316:20)
at /var/www/html/smart_recipe/node_modules/loader-runner/lib/LoaderRunner.js:367:11
at /var/www/html/smart_recipe/node_modules/loader-runner/lib/LoaderRunner.js:233:18
at context.callback (/var/www/html/smart_recipe/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
at Promise.resolve.then.then.catch (/var/www/html/smart_recipe/node_modules/postcss-loader/src/index.js:208:9)
# ./resources/css/app.css
I came across same issue and spent 5 hours on finding solution but could not.
After searching alot, I came across this
"Tailwind CSS v2.0 no longer supports Node.js 8 or 10. To build your CSS you'll need to ensure you are running Node.js 12.13.0 or higher in both your local and CI environments."
at https://tailwindcss.com/docs/upgrading-to-v2
So I realized that issue was in my Node version which was 10.x so
I uninstalled Node from my windows machine and downloaded LTS version (14.x).
So consider updating your Node version, it will solve the issue as it did work for me.
There is possibility that old node versions don't have that flat function that Tailwind CSS 2 has implemented and that's throwing error.
I Had the exact same issue after installing Breeze... Unfortunately the npm error message gives no clue of what is really going on !
Thanks to #DaniyalGondal I found out that my node version was raising the error because of tailwind V2 requirements (https://tailwindcss.com/docs/upgrading-to-v2) that comes with Breeze... So I did upgrade my node version using : sudo n latest under ubuntu20
Don't forget to restart your terminal after upgrading and check that your node is correctly upgraded using : node --version
If the node version is above 12.13.0, now npm run watch or npm run dev should work fine !
I am trying to get Protractor E2E testing to run on my local Windows workstation at work but I keep getting this error.
webpack: Compiled successfully. [07:50:41] I/file_manager - creating
folder
c:\repos\polo-buyer-ui\node_modules\protractor\node_modules\webdriver-manager\selenium
[07:50:42] I/update - chromedriver: unzipping chromedriver_2.32.zip
[07:50:44] I/launcher - Running 1 instances of WebDriver [07:50:44]
I/direct - Using ChromeDriver directly...
[0925/075047.256:ERROR:devtools_http_handler.cc(786)] DevTools
listening on 127.0.0.1:12985
I am able to get it to work with no issues on a linux workstation and my personal (non-work) PC runnning Windows 10. I find very little information on this error message
[0925/075047.256:ERROR:devtools_http_handler.cc(786)] DevTools
But I get this no matter what I do and I can't figure out why?
Try doing below steps:-
Open cmd and in the home path use below commands.
webdriver-manager clean
webdriver-manager status
webdriver-manager update
webdriver-manager start.
could you please check whether your laptop has any encryption in the system. Few of these encryptions corrupt the node modules , which results in the failure of the test cases.
This is the only reason I could guess since you ran all your test cases earlier
To verify this you could uninstall all the npm files and re-install them again and then re-run your test cases without re-starting your PC
PS : I faced the same issue and we asked IT team to remove encryption for just one folder which will contain all the automation code
I try to debug my server.js app with node-inspector (v0.12.8), nodejs (v5.9.1) and chrome (v49.0.2623.112 m) under windows environment.
In a shell i do
node-inspector
Node Inspector v0.12.8 Visit http://127.0.0.1:8080/?port=5858 to start debugging.
In a second shell i do
node --debug server.js
When i go to chrome tab i obtain a message:
Detached from target
remote debug has been terminated with reason: websocket_closed
please reattach to the new target
In the console dev tool of chrome i can see either a message that inspector can't find experimental function canvasInspection (removed in the latest chrome version).
I'm doing something wrong?
Not the answer specifically, but as of Node v6, you can actually just use the --inspect flag when you start a process, and it will let you use the Chrome debugging tools instead of relying on node-inspector. Check it out:
https://nodejs.org/docs/latest/api/debugger.html#debugger_v8_inspector_integration_for_node_js
Hope this helps!
I had the same problem, I fixed it the way below:
1- Go and edit the following file in your currently in use nodejs path:
...\node_modules\node-inspector\lib\InjectorClient.js
2- Go to line 111. if you're using vim as text editor you can do it by command :111
3- Add the following if statement at line 111 and indent the next line.
if(NM.length > 0)
cb(error, NM[0].ref);
4- Save and re-run node-inspector.
Cheers!
I'm using MacOS Sierra, Node v6.3.1. But the solution is general.
I had also faced this issue , but after lots of googling and finding about this issue. The only thing work for me is listed below :
Open your Command Promp(cmd) & type node -v, it will show you the version of node installed on your machine.
If the installed version is something 5.x.x or 6.x.x , then proceed further.
just uninstall this node version from control panel.
Install the node release with version 4 . I've tested with Node version v4.5.0 & I hope it will work fine for all Node with version v4.x.x.
Uninstall the previous node-inspector with command npm uninstall node-inspector -g.
Then Install again with command npm install node-inspector -g.
Then start debugging .. :)
Ok, let's make it simple :
I migrated my working node.js app to a new server today. The app spawns casperjs processes to do stuff.
Problem :
It doesn't run anymore
Why?
output casperjs --version from any folder but the one where my node app is installed :
root#xxxxx:/var# casperjs --version
1.1.0-beta3
now from the folder where my node app is installed :
root#xxxxx:/var/nodeapp# casperjs --version
Error: Cannot find module 'sys'
phantomjs://bootstrap.js:289
phantomjs://bootstrap.js:254 in require
/var/nodeapp/node_modules/system/engines/node/system.js:8
/var/nodeapp/node_modules/system/engines/node/system.js:45
1.1.0-beta3
Isn't that weird? :D Thanks for any insights
Edit : Tried uninstalling casper, then reinstalling from npm (I used github before). Same error.
-DEV was the previous version (see https://github.com/n1k0/casperjs/commit/9f510ed68010b3fadc8842115a12d2712213779d#diff-b9cfc7f2cdf78a7f4b91a753d10865a2 ), up to about 4 months ago. So 1.1-beta2 should give you that.
You could also try getting the latest git version; you can see a list of changes since 1.1.0-beta3 here (I don't spot your problem though): https://github.com/n1k0/casperjs/compare/1.1-beta3...master
By the way, are you running the same PhantomJS version on each of the working and non-working server? (Actually, what I would do next is upgrade your other server to first CasperJS 1.1-beta3, then the latest PhantomJS, and see if it breaks. If not, then it is not the software version but something else about the environment of the new server.)