You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I use npm init nightwatch@latest to setup a scaffolded Nightwatch 3 project I expect to be able to run the example tests when I run npx nightwatch, but instead I receive error
┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐│ │
│ ││ @swc/core threw an error when attempting to va │lidate swc compiler options. │ ││ You may be │ using an old version of swc which does not support the options used by ts-node. │ ":false,"jsc":{"parser":{"syntax":"typescript","tsx":false,"dynamicImport":true,"importAssertions":true},"target":"es2022","transform":{"legacyDecorator": │ ││ Try upgrading to the latest version of swc. ns":true}}} │ │ ││ Error message from swc: │ s`, `cacheRoot`, `disableBuiltinTransformsForInternalTesting` at line 1 column 395 │ ││ Failed to deserialize bu │ffer as swc::config::Options │ ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
Steps to reproduce
Run npm init nightwatch@latest
Select end to end testing and TypeScript as your setup settings.
Delete the example tests except google.ts
Run npx nightwatch
Error will appear in console
Sample test
import{NightwatchAPI,NightwatchTests}from'nightwatch';consthome: NightwatchTests={'Google title test': ()=>{browser.url('https://google.com/ncr').assert.titleEquals('Google');},'Google search test': ()=>{browser.setValue('textarea[name=q]','nightwatchjs').perform(function(this: NightwatchAPI){constactions=this.actions({async: true});returnactions.keyDown(this.Keys['ENTER']).keyUp(this.Keys['ENTER']);}).waitForElementVisible('#main').assert.textContains('#main','Nightwatch.js');},};exportdefaulthome;
Command to run
npx nightwatch
Verbose Output
PS C:\Users\Mr\Desktop\nwAsyncExample> npx nightwatch --verbose
┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐│ ││ @swc/core threw an error when attempting to validate swc compiler options. ││ You may be using an old version of swc which does not support the options used by ts-node. ││ Try upgrading to the latest version of swc. ││ Error message from swc: ││ Failed to deserialize buffer as swc::config::Options ││ JSON: {"sourceMaps":true,"module":{"noInterop":false,"type":"commonjs","strictMode":true,"ignoreDynamic":false},"swcrc":false,"jsc":{"parser":{"syntax":"typescript","tsx":false,"dynamicImport":true,"importAssertions":true},"target":"es2022","transform":{"legacyDecorator": ││ true,"react":{"throwIfNamespace":false,"useBuiltins":false}},"keepClassNames":true,"experimental":{"keepImportAssertions":true}}} ││ ││ Caused by: ││ unknown field `keepImportAssertions`, expected one of `plugins`, `keepImportAttributes`, `emitAssertForImportAttributes`, `cacheRoot`, `disableBuiltinTransformsForInternalTesting` at line 1 column 395 ││ ││ │└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
Nightwatch Configuration
// Refer to the online docs for more details:// https://nightwatchjs.org/gettingstarted/configuration///// _ _ _ _ _ _ _// | \ | |(_) | | | | | | | |// | \| | _ __ _ | |__ | |_ __ __ __ _ | |_ ___ | |__// | . ` || | / _` || '_ \ | __|\ \ /\ / / / _` || __| / __|| '_ \// | |\ || || (_| || | | || |_ \ V V / | (_| || |_ | (__ | | | |// \_| \_/|_| \__, ||_| |_| \__| \_/\_/ \__,_| \__| \___||_| |_|// __/ |// |___/module.exports={// An array of folders (excluding subfolders) where your tests are located;// if this is not specified, the test source must be passed as the second argument to the test runner.src_folders: ['test','nightwatch'],// See https://nightwatchjs.org/guide/concepts/page-object-model.htmlpage_objects_path: [],// See https://nightwatchjs.org/guide/extending-nightwatch/adding-custom-commands.htmlcustom_commands_path: [],// See https://nightwatchjs.org/guide/extending-nightwatch/adding-custom-assertions.htmlcustom_assertions_path: [],// See https://nightwatchjs.org/guide/extending-nightwatch/adding-plugins.htmlplugins: [],// See https://nightwatchjs.org/guide/concepts/test-globals.htmlglobals_path: '',webdriver: {},test_workers: {enabled: true},test_settings: {default: {disable_error_log: false,launch_url: 'file:///C:/Users/Mr/Desktop/nwAsyncExample/example.html',screenshots: {enabled: false,path: 'screens',on_failure: true},desiredCapabilities: {browserName: 'chrome'},webdriver: {start_process: true,server_path: ''},},chrome: {desiredCapabilities: {browserName: 'chrome','goog:chromeOptions': {// More info on Chromedriver: https://sites.google.com/a/chromium.org/chromedriver///// w3c:false tells Chromedriver to run using the legacy JSONWire protocol (not required in Chrome 78)w3c: true,args: [//'--no-sandbox',//'--ignore-certificate-errors',//'--allow-insecure-localhost',//'--headless']}},webdriver: {start_process: true,server_path: '',cli_args: [// --verbose]}},},};
Nightwatch.js Version
3.1.3
Node Version
18.16.0
Browser
Chrome 117
Operating System
Windows 10
Additional Information
The text was updated successfully, but these errors were encountered:
Description of the bug/issue
When I use
npm init nightwatch@latest
to setup a scaffolded Nightwatch 3 project I expect to be able to run the example tests when I runnpx nightwatch
, but instead I receive errorSteps to reproduce
npm init nightwatch@latest
npx nightwatch
Error will appear in console
Sample test
Command to run
Verbose Output
Nightwatch Configuration
Nightwatch.js Version
3.1.3
Node Version
18.16.0
Browser
Chrome 117
Operating System
Windows 10
Additional Information
The text was updated successfully, but these errors were encountered: