Cypress cucumber configuration setup - testing

I am trying to run tests with cypress and Cucumber, but, I am limited by a terrible error when running tests. I don't know much about what's going on, but I have tried to follow all the documentations I could find related to the problem.
The errors I am getting
coder#jessie:~/Desktop/jessie/cypressLearn$ yarn run loginTest
yarn run v1.22.19
warning ../../../package.json: No license field
$ cypress run --spec features/login/login.feature
====================================================================================================
(Run Starting)
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
│ Cypress: 11.2.0 │
│ Browser: Electron 106 (headless) │
│ Node Version: v16.14.2 (/home/coder/.nvm/versions/node/v16.14.2/bin/node) │
│ Specs: 1 found (login.feature) │
│ Searched: features/login/login.feature │
└────────────────────────────────────────────────────────────────────────────────────────────────┘
────────────────────────────────────────────────────────────────────────────────────────────────────
Running: login.feature (1 of 1)
Oops...we found an error preparing this test file:
> features/login/login.feature
The error was:
Error: Build failed with 7 errors:
node_modules/#badeball/cypress-cucumber-preprocessor/lib/create-tests.js:6:50: ERROR: Could not resolve "#cucumber/tag-expressions"
node_modules/#badeball/cypress-cucumber-preprocessor/lib/create-tests.js:7:39: ERROR: Could not resolve "#cucumber/cucumber-expressions"
node_modules/#badeball/cypress-cucumber-preprocessor/lib/create-tests.js:8:23: ERROR: Could not resolve "uuid"
node_modules/#badeball/cypress-cucumber-preprocessor/lib/registry.js:7:39: ERROR: Could not resolve "#cucumber/cucumber-expressions"
node_modules/#badeball/cypress-cucumber-preprocessor/lib/registry.js:8:50: ERROR: Could not resolve "#cucumber/tag-expressions"
...
at failureErrorWithLog (/home/coder/Desktop/jessie/cypressLearn/node_modules/esbuild/lib/main.js:1574:15)
at /home/coder/Desktop/jessie/cypressLearn/node_modules/esbuild/lib/main.js:1032:28
at runOnEndCallbacks (/home/coder/Desktop/jessie/cypressLearn/node_modules/esbuild/lib/main.js:1446:61)
at buildResponseToResult (/home/coder/Desktop/jessie/cypressLearn/node_modules/esbuild/lib/main.js:1030:7)
at /home/coder/Desktop/jessie/cypressLearn/node_modules/esbuild/lib/main.js:1142:14
at responseCallbacks.<computed> (/home/coder/Desktop/jessie/cypressLearn/node_modules/esbuild/lib/main.js:679:9)
at handleIncomingPacket (/home/coder/Desktop/jessie/cypressLearn/node_modules/esbuild/lib/main.js:734:9)
at Socket.readFromStdout (/home/coder/Desktop/jessie/cypressLearn/node_modules/esbuild/lib/main.js:655:7)
at Socket.emit (node:events:526:28)
at addChunk (node:internal/streams/readable:315:12)
at readableAddChunk (node:internal/streams/readable:289:9)
at Socket.Readable.push (node:internal/streams/readable:228:10)
at Pipe.onStreamRead (node:internal/stream_base_commons:190:23)
This occurred while Cypress was compiling and bundling your test code. This is usually caused by:
- A missing file or dependency
- A syntax error in the file or one of its dependencies
Fix the error in your code and re-run your tests.
(Results)
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
│ Tests: 0 │
│ Passing: 0 │
│ Failing: 1 │
│ Pending: 0 │
│ Skipped: 0 │
│ Screenshots: 0 │
│ Video: true │
│ Duration: 0 seconds │
│ Spec Ran: login.feature │
└────────────────────────────────────────────────────────────────────────────────────────────────┘
(Video)
- Started processing: Compressing to 32 CRF
- Finished processing: /home/coder/Desktop/jessie/cypressLearn/cypress/videos/logi (2 seconds)
n.feature.mp4
====================================================================================================
(Run Finished)
Spec Tests Passing Failing Pending Skipped
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
│ ✖ login.feature 0ms - - 1 - - │
└────────────────────────────────────────────────────────────────────────────────────────────────┘
✖ 1 of 1 failed (100%) 0ms - - 1 - -
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
My package.json
{
"name": "cypresslearn",
"version": "1.0.0",
"description": "Learning cypress and cucumber",
"main": "index.js",
"scripts": {
"cy:open": "cypress open",
"cy:tests": "cypress run",
"loginTest": "cypress run --spec features/login/login.feature"
},
"keywords": [
"cypress",
"cucumber",
"testing"
],
"author": "Jexsie",
"license": "ISC",
"devDependencies": {
"#bahmutov/cypress-esbuild-preprocessor": "^2.1.5",
"cypress": "^11.2.0",
"esbuild": "^0.15.16"
},
"dependencies": {
"#badeball/cypress-cucumber-preprocessor": "^14.0.0",
"#esbuild-plugins/node-modules-polyfill": "^0.1.4"
},
"cypress-cucumber-preprocessor": {
"stepDefinitions": [
"cypress/stepDefinitions/[filePath]/*.js"
]
}
}
My cypress.config.js
const { defineConfig } = require("cypress");
const createBundler = require("#bahmutov/cypress-esbuild-preprocessor");
const {
addCucumberPreprocessorPlugin,
} = require("#badeball/cypress-cucumber-preprocessor");
const nodePolyfills =
require("#esbuild-plugins/node-modules-polyfill").NodeModulesPolyfillPlugin;
const {
createEsbuildPlugin,
} = require("#badeball/cypress-cucumber-preprocessor/esbuild");
module.exports = defineConfig({
e2e: {
async setupNodeEvents(on, config) {
const bundler = createBundler({
plugins: [nodePolyfills(), createEsbuildPlugin(config)],
});
on("file:preprocessor", bundler);
await addCucumberPreprocessorPlugin(on, config);
return config;
},
specPattern: "features/**/*.feature",
supportFile: "cypress/support/e2e.js",
baseUrl: "http://zero.webappsecurity.com",
},
});
I tried to run tests using yarn run loginTest for the login and expected the test to be passing

Related

BrowserStack cypress Run > error with cypress-cucumber-preprocessor dependency graph + cypress folder

When launching tests with cypress to browserstack
At the moment, debuging it by runnning the command on my dev environment (ubuntu)
npm run browserstack
it calls the script from package.json "browserstack": "./node_modules/.bin/browserstack-cypress run --sync"
My feature log execution shows the following error in browerstack build dashboard
Running: features\desktop.feature (NaN of undefined)
Oops...we found an error preparing this test file:
cypress\integration\features\desktop.feature
The error was:
Error: Can't walk dependency graph: Cannot find module 'C:UsershelloDocumentsdocumentscypress_testcypress_test_folder
ode_modulescypress-cucumber-preprocessorlib
esolveStepDefinition' from 'cypress_test_folder\cypress\integration\features'
required by cypress_test_folder\cypress\integration\features\desktop.feature
at cypress_test_folder\node_modules\browser-resolve\node_modules\resolve\lib\async.js:46:17
at process (cypress_test_folder\node_modules\browser-resolve\node_modules\resolve\lib\async.js:173:43)
at ondir (cypress_test_folder\node_modules\browser-resolve\node_modules\resolve\lib\async.js:188:17)
at load (cypress_test_folder\node_modules\browser-resolve\node_modules\resolve\lib\async.js:69:43)
at onex (cypress_test_folder\node_modules\browser-resolve\node_modules\resolve\lib\async.js:92:31)
at cypress_test_folder\node_modules\browser-resolve\node_modules\resolve\lib\async.js:22:47
at callback (C:\Windows\cypress_package\6.8.0\node_modules\graceful-fs\polyfills.js:289:20)
at FSReqCallback.oncomplete (fs.js:172:21)
This occurred while Cypress was compiling and bundling your test code. This is usually caused by:
- A missing file or dependency
- A syntax error in the file or one of its dependencies
Fix the error in your code and re-run your tests.
(Results)
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
│ Tests: 0 │
│ Passing: 0 │
│ Failing: 1 │
│ Pending: 0 │
│ Skipped: 0 │
│ Screenshots: 0 │
│ Video: false │
│ Duration: 0 seconds │
│ Spec Ran: features\desktop.feature │
└────────────────────────────────────────────────────────────────────────────────────────────────┘
(Uploading Results)
- Nothing to Upload
My browserstack.json is the following
{
"auth": {
"username": "<username>",
"access_key": "<access_key>"
},
"browsers": [
{
"os": "Windows 10",
"browser": "chrome",
"versions": ["latest"]
}
],
"run_settings": {
"cypress_version" : "6",
"cypress_config_file": "./cypress.json",
"project_name": "myproject",
"build_name": "ui-automation",
"specs": ["cypress/integration/features/desktop.feature","cypress/integration/features/desktop/desktop.js"],
"exclude": [],
"parallels": "Here goes the number of parallels you want to run",
"npm_dependencies": {
"cypress-cucumber-preprocessor": "^1.19.2",
"browserstack-cypress-cli": "^1.8.1",
"cypress": "^3.8.3",
"cypress-xpath": "^1.6.2"
},
"package_config_options": {
"cypress_options": {
"testFiles": "**/*.feature",
"ignoreTestFiles": "*.js",
"chromeWebSecurity": false
},
"cypress-cucumber-preprocessor_options": {
"nonGlobalStepDefinitions": true,
"step_definitions": "cypress/integration/features/dekstop/"
}
},
"headless": false
},
"connection_settings": {
"local": false,
"local_identifier": null,
"local_mode": null,
"local_config_file": null
},
"disable_usage_reporting": false
}
Following the start guide and any else tips, I did not find out what's going on, especially seems that on browserstack log, it's trying to locate a module with a windows path whereas all my testing env is on linux ubuntu > I aim next to run all these on gitlab

How to make electron-forge and webpack loading a specific version of a module, if two versions are present within the npm tree?

This is the package.json
{
"name": "IpfsPlaying",
"version": "2.0.2",
"description": "IpfsPlaying",
"main": ".webpack/main",
"scripts": {
"start": "cross-env NODE_ENV=development electron-forge start",
"package": "electron-forge package",
"make": "electron-forge make",
"publish": "electron-forge publish",
"lint": "eslint --ext .ts ."
},
"config": {
"forge": "./tools/forge/forge.config.js"
},
"devDependencies": {
"#electron-forge/cli": "^6.0.0-beta.54",
"#electron-forge/maker-deb": "6.0.0-beta.53",
"#electron-forge/maker-rpm": "6.0.0-beta.53",
"#electron-forge/maker-squirrel": "^6.0.0-beta.54",
"#electron-forge/maker-zip": "6.0.0-beta.53",
"#electron-forge/plugin-webpack": "6.0.0-beta.53",
"#types/react": "^16.9.49",
"#types/react-dom": "^16.9.8",
"#types/webpack-env": "^1.15.2",
"#typescript-eslint/eslint-plugin": "^4.1.1",
"#typescript-eslint/parser": "^4.1.1",
"copy-webpack-plugin": "6",
"cross-env": "^7.0.2",
"electron": "^10.1.2",
"eslint": "^7.9.0",
"eslint-import-resolver-alias": "^1.1.2",
"eslint-plugin-import": "^2.20.0",
"eslint-plugin-react": "^7.20.6",
"fork-ts-checker-webpack-plugin": "^5.2.0",
"less": "^3.12.2",
"node-loader": "^1.0.1",
"react-hot-loader": "^4.12.21",
"ts-loader": "^8.0.3",
"typescript": "^4.0.2",
"webpack": "4"
},
"dependencies": {
"#hot-loader/react-dom": "^16.13.0",
"ipfs": "^0.54.1",
"ipfs-http-client": "^49.0.1",
"ipfs-utils": "^6.0.0",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-viewer": "^3.2.2",
"react-window": "^1.8.6"
}
}
When using ipfs in main.ts I get this error:
A JavaScript error occurred in the main process
Uncaught Exception:
Error: Cannot find module 'jsonfile/utils'
A JavaScript error occurred in the main process
Uncaught Exception:
Error: Cannot find module 'jsonfile/utils'
at webpackMissingModule (/home/marco/webMatters/electronMatters/IpfsPlaying/.webpack/main/index.js:78837:87)
at Object../node_modules/fs-extra/lib/json/output-json.js (/home/marco/webMatters/electronMatters/IpfsPlaying/.webpack
/main/index.js:78837:176)
at __webpack_require__ (/home/marco/webMatters/electronMatters/IpfsPlaying/.webpack/main/index.js:21:30)
at Object../node_modules/fs-extra/lib/json/index.js (/home/marco/webMatters/electronMatters/IpfsPlaying/.webpack
/main/index.js:78765:25)
at __webpack_require__ (/home/marco/webMatters/electronMatters/IpfsPlaying/.webpack/main/index.js:21:30)
at Object../node_modules/fs-extra/lib/index.js (/home/marco/webMatters/electronMatters/IpfsPlaying/.webpack
/main/index.js:78731:6)
at __webpack_require__ (/home/marco/webMatters/electronMatters/IpfsPlaying/.webpack/main/index.js:21:30)
at Object../node_modules/ipfs-utils/src/files/glob-source.js (/home/marco/webMatters/electronMatters/IpfsPlaying/.webpack
/main/index.js:115083:12)
at __webpack_require__ (/home/marco/webMatters/electronMatters/IpfsPlaying/.webpack/main/index.js:21:30)
at Object../node_modules/ipfs-core/src/index.js (/home/marco/webMatters/electronMatters/IpfsPlaying/.webpack
/main/index.js:107575:20)
People of IPFS Project made, kindly, thoughrough analysis of the problem, discovering that there is a collision between two versions of jsonfile:
There are two copies of jsonfile in my node_modules folder:
$ find . -type d -name jsonfile
./node_modules/jsonfile <-- v4.0.0
./node_modules/fs-extra/node_modules/jsonfile <-- v6.1.0
I removed all the packages not stricly required for ipfs and for a bare minimum electron-react-typescript app.
And discovered that, in accordance what was already found by IPFS's people,
these are the modules which depend on jsonfile :
(base) marco#pc01:~/webMatters/electronMatters/IpfsPlaying$ npm ls jsonfile
IpfsPlaying#2.0.2 /home/marco/webMatters/electronMatters/IpfsPlaying
├─┬ #electron-forge/cli#6.0.0-beta.54
│ ├─┬ #electron-forge/core#6.0.0-beta.54
│ │ └─┬ electron-packager#15.2.0
│ │ └─┬ galactus#0.2.1
│ │ ├─┬ flora-colossus#1.0.1
│ │ │ └─┬ fs-extra#7.0.1
│ │ │ └── jsonfile#4.0.0 deduped
│ │ └─┬ fs-extra#4.0.3
│ │ └── jsonfile#4.0.0 deduped
│ ├─┬ #electron/get#1.12.2
│ │ └─┬ fs-extra#8.1.0
│ │ └── jsonfile#4.0.0
│ └─┬ fs-extra#9.0.1
│ └── jsonfile#6.1.0
└─┬ #electron-forge/maker-squirrel#6.0.0-beta.54
└─┬ electron-winstaller#4.0.1
└─┬ fs-extra#7.0.1
└── jsonfile#4.0.0 deduped
If I remove the jsonfile v4 I get the error: "An unhandled exception has occured inside Forge":
(base) marco#pc01:~/webMatters/electronMatters/IpfsPlaying$ rm -rf ./node_modules/jsonfile/
(base) marco#pc01:~/webMatters/electronMatters/IpfsPlaying$ yarn start
yarn run v1.22.5
$ cross-env NODE_ENV=development electron-forge start
An unhandled exception has occurred inside Forge:
Cannot find module 'jsonfile'
Require stack:
- /home/marco/webMatters/electronMatters/IpfsPlaying/node_modules/#electron/get/node_modules/fs-extra/lib/json/jsonfile.js
- /home/marco/webMatters/electronMatters/IpfsPlaying/node_modules/#electron/get/node_modules/fs-extra/lib/json/index.js
- /home/marco/webMatters/electronMatters/IpfsPlaying/node_modules/#electron/get/node_modules/fs-extra/lib/index.js
- /home/marco/webMatters/electronMatters/IpfsPlaying/node_modules/#electron/get/dist/cjs/utils.js
- /home/marco/webMatters/electronMatters/IpfsPlaying/node_modules/#electron/get/dist/cjs/artifact-utils.js
- /home/marco/webMatters/electronMatters/IpfsPlaying/node_modules/#electron/get/dist/cjs/index.js
- /home/marco/webMatters/electronMatters/IpfsPlaying/node_modules/#electron-forge/core/dist/api/make.js
- /home/marco/webMatters/electronMatters/IpfsPlaying/node_modules/#electron-forge/core/dist/api/index.js
- /home/marco/webMatters/electronMatters/IpfsPlaying/node_modules/#electron-forge/cli/dist/util/check-system.js
- /home/marco/webMatters/electronMatters/IpfsPlaying/node_modules/#electron-forge/cli/dist/electron-forge.js
Error: Cannot find module 'jsonfile'
Require stack:
- /home/marco/webMatters/electronMatters/IpfsPlaying/node_modules/#electron/get/node_modules/fs-extra/lib/json/jsonfile.js
- /home/marco/webMatters/electronMatters/IpfsPlaying/node_modules/#electron/get/node_modules/fs-extra/lib/json/index.js
- /home/marco/webMatters/electronMatters/IpfsPlaying/node_modules/#electron/get/node_modules/fs-extra/lib/index.js
- /home/marco/webMatters/electronMatters/IpfsPlaying/node_modules/#electron/get/dist/cjs/utils.js
- /home/marco/webMatters/electronMatters/IpfsPlaying/node_modules/#electron/get/dist/cjs/artifact-utils.js
- /home/marco/webMatters/electronMatters/IpfsPlaying/node_modules/#electron/get/dist/cjs/index.js
- /home/marco/webMatters/electronMatters/IpfsPlaying/node_modules/#electron-forge/core/dist/api/make.js
- /home/marco/webMatters/electronMatters/IpfsPlaying/node_modules/#electron-forge/core/dist/api/index.js
- /home/marco/webMatters/electronMatters/IpfsPlaying/node_modules/#electron-forge/cli/dist/util/check-system.js
- /home/marco/webMatters/electronMatters/IpfsPlaying/node_modules/#electron-forge/cli/dist/electron-forge.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1030:15)
at Function.Module._load (internal/modules/cjs/loader.js:899:27)
at Module.require (internal/modules/cjs/loader.js:1090:19)
at require (internal/modules/cjs/helpers.js:75:18)
at Object.<anonymous> (/home/marco/webMatters/electronMatters/IpfsPlaying/node_modules/#electron/get/node_modules
/fs-extra/lib/json/jsonfile.js:4:18)
at Module._compile (internal/modules/cjs/loader.js:1201:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1221:10)
at Module.load (internal/modules/cjs/loader.js:1050:32)
at Function.Module._load (internal/modules/cjs/loader.js:938:14)
at Module.require (internal/modules/cjs/loader.js:1090:19)
In a nutshell the problem is that electron-forge uses the version 4 of jsonfile, while Ipfs uses version 6 of jsonfile. And webpack loads the version 4.
How to make electron-forge and webpack loading a specific version of a module, if two versions are present within the npm tree?

Npm audit report says '1 vulnerability required manual review and could not be updated' / .Node js

Firstly, I got this message below when running npm audit:
updated 1 package and audited 381 packages in 1.767s
found 1 moderate severity vulnerability
run `npm audit fix` to fix them, or `npm audit` for details
→ weatherApp npm audit
=== npm audit security report ===
┌────────────────────────────────────────────────────────────────────────────┐
│ Manual Review │
│ Some vulnerabilities require your attention to resolve │
│ │
│ Visit https://go.npm.me/audit-guide for additional guidance │
└────────────────────────────────────────────────────────────────────────────┘
┌───────────────┬────────────────────────────────────────────────────────────┐
│ Moderate │ Denial of Service │
├───────────────┼────────────────────────────────────────────────────────────┤
│ Package │ axios │
├───────────────┼────────────────────────────────────────────────────────────┤
│ Patched in │ >=0.18.1 │
├───────────────┼────────────────────────────────────────────────────────────┤
│ Dependency of │ nominatim-geocoder │
├───────────────┼────────────────────────────────────────────────────────────┤
│ Path │ nominatim-geocoder > axios │
├───────────────┼────────────────────────────────────────────────────────────┤
│ More info │ https://npmjs.com/advisories/880 │
└───────────────┴────────────────────────────────────────────────────────────┘
found 1 moderate severity vulnerability in 381 scanned packages
1 vulnerability requires manual review. See the full report for details.
→ weatherApp █
Typing npm audit fix didn't help neither:
fixed 0 of 1 vulnerability in 381 scanned packages
1 vulnerability required manual review and could not be updated
On https://npmjs.com/advisories/880 they recommended to upgrade axios version to >=0.18.1. However, in my package.json the version is ^0.19.0.
package.json:
...
"dependencies": {
"axios": "^0.19.0",
"body-parser": "^1.19.0",
"ejs": "^3.0.1",
"epxress": "0.0.1-security",
"express": "^4.17.1",
"nodemon": "^2.0.1",
"nominatim-geocoder": "^0.1.4",
"request": "^2.88.0"
}
...
So, I tried to manually upgrade the version of axios in the package-lock.json as it still shows 0.16.1.
package-lock.json:
"nominatim-geocoder": {
"version": "0.1.4",
"resolved": "https://registry.npmjs.org/nominatim-geocoder/-/nominatim-geocoder-0.1.4.tgz",
"integrity": "sha1-7o8I+CZq0tL5zYfdQhzCdmtRF78=",
"requires": {
"axios": "^0.16.1",
"lru": "^3.1.0",
"promise-queue": "^2.2.3",
"sha1": "^1.1.1"
},
"dependencies": {
"axios": {
"version": "0.16.2",
"resolved": "https://registry.npmjs.org/axios/-/axios-0.16.2.tgz",
"integrity": "sha1-uk+S8XFn37q0CYN4VFS5rBScPG0=",
"requires": {
"follow-redirects": "^1.2.3",
"is-buffer": "^1.1.5"
}
... to version 0.19.0. However, that didn't help... Any suggestions?

failed to start nuxt project through pm2

I am continuously failing to start the nuxt project through pm2.
I created the project today using npx create-nuxt-app arif-app my project structure is initial for testing purpose but still i would like to illustrate -
arif-app (project-dir) -->
.editorconfig
.gitignore
.nuxt <DIR>
assets <DIR>
components <DIR>
ecosystem.config.js
layouts <DIR>
middleware <DIR>
node_modules <DIR>
nuxt.config.js
package-lock.json
package.json
pages <DIR>
plugins <DIR>
README.md
static <DIR>
store <DIR>
pm2 ecosystem config in ecosystem.config.js is -
module.exports = {
apps : [{
name: '.nuxt',
script: 'index.js',
// Options reference: https://pm2.io/doc/en/runtime/reference/ecosystem-file/
args: 'one two',
instances: 1,
autorestart: true,
watch: false,
max_memory_restart: '1G',
env: {
NODE_ENV: 'development'
},
env_production: {
NODE_ENV: 'production'
}
}],
deploy : {
production : {
user : 'momustafa',
host : '127.0.0.1',
ref : 'origin/master',
repo : 'git#github.com:repo.git',
path : 'C:\Users\momustafa\Desktop\Assets\new_test\arif-app',
'post-deploy' : 'npm install && pm2 reload ecosystem.config.js --env production'
}
}
};
and inside the package.json is :
"scripts": {
"dev": "nuxt",
"build": "nuxt build",
"start": "pm2 start ./node_modules/nuxt/bin/nuxt -i max --attach",
"generate": "nuxt generate"
},
"dependencies": {
"#nuxtjs/axios": "^5.3.6",
"nuxt": "^2.0.0",
"vue": "^2.6.10",
"vue-awesome": "^3.5.4",
"vue-loader": "^15.7.0"
},
and before the pm2 start, I already have build the project using npm run build,
and now after the build, I passed the following command(s) through pm2 to run nuxt project,
C:\Users\momustafa\Desktop\Assets\new_test\arif-app>pm2 start .nuxt
[PM2] Applying action restartProcessId on app [.nuxt](ids: 0)
[PM2] [.nuxt](0) ✓
[PM2] Process successfully started
┌──────────┬────┬─────────┬──────┬───────┬─────────┬─────────┬────────┬─────┬────────┬───────────┬──────────┐
│ App name │ id │ version │ mode │ pid │ status │ restart │ uptime │ cpu │ mem │ user │ watching │
├──────────┼────┼─────────┼──────┼───────┼─────────┼─────────┼────────┼─────┼────────┼───────────┼──────────┤
│ .nuxt │ 0 │ N/A │ fork │ 11164 │ stopped │ 16 │ 0 │ 0% │ 0 B │ momustafa │ disabled │
└──────────┴────┴─────────┴──────┴───────┴─────────┴─────────┴────────┴─────┴────────┴───────────┴──────────┘
Use `pm2 show <id|name>` to get more details about an app
C:\Users\momustafa\Desktop\Assets\new_test\arif-app>pm2 kill
[PM2] [v] Modules Stopped
[PM2] Applying action deleteProcessId on app [all](ids: 0)
[PM2] [.nuxt](0) ✓
[PM2] [v] All Applications Stopped
[PM2] [v] PM2 Daemon Stopped
C:\Users\momustafa\Desktop\Assets\new_test\arif-app>pm2 start npm --name .nuxt -- start
[PM2] Spawning PM2 daemon with pm2_home=C:\Users\momustafa\.pm2
[PM2] PM2 Successfully daemonized
[PM2] Starting C:\PROGRAM FILES\NODEJS\NPM.CMD in fork_mode (1 instance)
[PM2] Done.
┌──────────┬────┬─────────┬──────┬──────┬─────────┬─────────┬────────┬─────┬────────┬───────────┬──────────┐
│ App name │ id │ version │ mode │ pid │ status │ restart │ uptime │ cpu │ mem │ user │ watching │
├──────────┼────┼─────────┼──────┼──────┼─────────┼─────────┼────────┼─────┼────────┼───────────┼──────────┤
│ .nuxt │ 0 │ N/A │ fork │ 8864 │ stopped │ 1 │ 0 │ 0% │ 0 B │ momustafa │ disabled │
└──────────┴────┴─────────┴──────┴──────┴─────────┴─────────┴────────┴─────┴────────┴───────────┴──────────┘
Use `pm2 show <id|name>` to get more details about an app
and continuously I am getting following pm2 error logs -
C:\Users\momustafa\Desktop\Assets\new_test\arif-app\.nuxt\index.js:1
(function (exports, require, module, __filename, __dirname) { import Vue from 'vue'
^^^
SyntaxError: Unexpected identifier
at new Script (vm.js:80:7)
at createScript (vm.js:274:10)
at Object.runInThisContext (vm.js:326:10)
at Module._compile (internal/modules/cjs/loader.js:664:28)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
at Module.load (internal/modules/cjs/loader.js:600:32)
at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
at Function.Module._load (internal/modules/cjs/loader.js:531:3)
at Object.<anonymous> (C:\Users\momustafa\AppData\Roaming\npm\node_modules\pm2\lib\ProcessContainerFork.js:27:21)
at Module._compile (internal/modules/cjs/loader.js:701:30)
please help someone.
Note: In nuxt#2.8.1 the module file name is nuxt.js instead of nuxt-start.js

Vue Native installation failed with Vue Native CLI

Created helloworld project refer to https://vue-native.io/docs/installation.html#Setup-with-Vue-Native-Cli
But has the error following as and my first application doesn't start.
Unable to resolve "../../App" from "node_modules/expo/AppEntry.js"
My environment
$ node -v
v9.9.0
$ npm -v
6.4.1
$ npm list --depth=0
empty-project-template# /Users/kamo/repo/github.com/kamontia/vue-
native-app/helloworld
├── babel-preset-expo#5.0.0
├── expo#31.0.4
├── react#16.5.0
├── react-native#0.57.1
├── vue-native-core#0.0.8
├── vue-native-helper#0.0.9
└── vue-native-scripts#0.0.14
npm ERR! peer dep missing: react#16.0.0-alpha.6, required by react-
native-reanimated#1.0.0-alpha.10
npm ERR! peer dep missing: react-native#^0.44.1, required by react-
native-reanimated#1.0.0-alpha.10
On simulator,
Unable to resolve module ../../App from
xxx/node_modules/expo/AppEntery.js: The ./../App could not be found
from ...
Indeed, none of these files exist:
* ... App(.native||.ios.js|...
What should I do?
I also tried to create project with React Native refer to https://vue-native.io/docs/installation.html#Setup-with-React-Native, and success to start the application.
Had a same issue. Below works for me
In app.json add
"sourceExts": [ "js", "json", "ts", "tsx", "jsx", "vue"]
Inside
"packagerOpts"
"packagerOpts":
{ "sourceExts": [ "js", "json", "ts", "tsx", "jsx", "vue"],
"config": "metro.config.js" }
From: https://github.com/GeekyAnts/vue-native-core/issues/117
This works for me