We are using grunt to build our angularjs application.
GruntFile.js contains war:target task to create war file.
Its working locally but not while running jenkins build.
We have 2 different jobs running with following npm and node version.
In 1 job war is getting created and in other war creation failing.
npm info using npm#5.6.0
npm info using node#v8.11.4
Running "war:target" (war) task
Warning: Unexpected token *
Use --force to continue.
Aborted due to warnings.
Stack trace for reference
Warning: Unexpected token * Use --force to continue.
/tmp/workspace/dept-dev-my-angular-app-17486/dept-dev-my-angular-app-17486-my-angular-app-ui.feature-develop/node_modules/readdir-glob/index.js:62
async function* exploreWalkAsync(dir, path, followSyslinks, useStat, shouldSkip, strict) {
^
SyntaxError: Unexpected token *
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:616:28)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/tmp/workspace/dept-dev-my-angular-app-17486/dept-dev-my-angular-app-17486-my-angular-app-ui.feature-develop/node_modules/archiver/lib/core.js:9:12)
Could you please advise on this ?
Related
I was having a lot of trouble with elasticsearch partially because the hard drive on my laptop is filling up I tried making space but I asked myself if maybe there was an elasticsearch lite for development environment only and then I found npm elasticsearch-lite I followed the instructions, installed it, when I run: PORT=9200 ~/node_modules/.bin/elasticsearch I get the following error, even after success running npm install wasi:
$ PORT=9200 ~/node_modules/.bin/elasticsearch
internal/modules/cjs/loader.js:892
throw err;
^
Error: Cannot find module 'wasi'
Require stack:
- /home/fugee/node_modules/elasticsearch-lite/lib.elasticsearch.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:889:15)
at Function.Module._load (internal/modules/cjs/loader.js:745:27)
at Module.require (internal/modules/cjs/loader.js:961:19)
at require (internal/modules/cjs/helpers.js:92:18)
at /home/fugee/node_modules/elasticsearch-lite/lib.elasticsearch.js:52:34
at Array.forEach (<anonymous>)
at /home/fugee/node_modules/elasticsearch-lite/lib.elasticsearch.js:50:53
at /home/fugee/node_modules/elasticsearch-lite/lib.elasticsearch.js:59:6
at Object.<anonymous> (/home/fugee/node_modules/elasticsearch-lite/lib.elasticsearch.js:360:2)
at Module._compile (internal/modules/cjs/loader.js:1072:14) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/home/fugee/node_modules/elasticsearch-lite/lib.elasticsearch.js'
]
}
I'm trying to upgrade to Vaadin 23 from Vaadin 18. After performing the steps listed on the upgrade instructions I'm having a ton of issues getting the front-end build. The latest blocker is that after starting the app, npm runs, but I see the below error. I checked the node_modules folder and the build-status-plugin folder is a symlink to target\plugins\build-status-plugin, which is empty.
The rest of the node_modules folder looks fine as far as I can tell.
java.lang.IllegalStateException: Startup of Webpack failed. Output was:
[webpack-cli] Failed to load 'C:\Users\daniel.watson\git\data-loader-web\webpack.config.js' config
[webpack-cli] Error: Cannot find module '#vaadin/build-status-plugin'
Require stack:
- C:\Users\daniel.watson\git\data-loader-web\webpack.generated.js
- C:\Users\daniel.watson\git\data-loader-web\webpack.config.js
- C:\Users\daniel.watson\git\data-loader-web\node_modules\webpack-cli\lib\webpack-cli.js
- C:\Users\daniel.watson\git\data-loader-web\node_modules\webpack-cli\lib\bootstrap.js
- C:\Users\daniel.watson\git\data-loader-web\node_modules\webpack-cli\bin\cli.js
- C:\Users\daniel.watson\git\data-loader-web\node_modules\webpack-dev-server\bin\webpack-dev-server.js
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (C:\Users\daniel.watson\git\data-loader-web\webpack.generated.js:16:27)
at Module._compile (node:internal/modules/cjs/loader:1103:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1155:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'C:\\Users\\daniel.watson\\git\\data-loader-web\\webpack.generated.js',
'C:\\Users\\daniel.watson\\git\\data-loader-web\\webpack.config.js',
'C:\\Users\\daniel.watson\\git\\data-loader-web\\node_modules\\webpack-cli\\lib\\webpack-cli.js',
'C:\\Users\\daniel.watson\\git\\data-loader-web\\node_modules\\webpack-cli\\lib\\bootstrap.js',
'C:\\Users\\daniel.watson\\git\\data-loader-web\\node_modules\\webpack-cli\\bin\\cli.js',
'C:\\Users\\daniel.watson\\git\\data-loader-web\\node_modules\\webpack-dev-server\\bin\\webpack-dev-server.js'
]
}
com.vaadin.base.devserver.AbstractDevServerRunner.doStartDevModeServer(AbstractDevServerRunner.java:217)
com.vaadin.base.devserver.AbstractDevServerRunner.runOnFutureComplete(AbstractDevServerRunner.java:169)
com.vaadin.base.devserver.AbstractDevServerRunner.lambda$new$0(AbstractDevServerRunner.java:160)
java.base/java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:859)
java.base/java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:837)
java.base/java.util.concurrent.CompletableFuture$Completion.exec(CompletableFuture.java:479)
java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1016)
java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1665)
java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1598)
java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
I was trying to follow this tutorial
This is a tutorial on Solana program dev using anchor and the error rises from using yarn on ubuntu 20.0 i guess
and I got this long error I can't understand
All the help is appreciated
yarn run v1.22.17
warning package.json: No license field
$ /home/sadaf/code/solana-twitter/node_modules/.bin/ts-mocha -p ./tsconfig.json -t 1000000 'tests/**/*.ts'
ReferenceError: TextEncoder is not defined
at Function.fromSecretKey (/home/sadaf/code/solana-twitter/node_modules/#solana/web3.js/src/keypair.ts:66:23)
at Function.local (/home/sadaf/code/solana-twitter/node_modules/#project-serum/anchor/src/nodewallet.ts:13:27)
at Function.env (/home/sadaf/code/solana-twitter/node_modules/#project-serum/anchor/src/provider.ts:79:31)
at Suite.describe (/home/sadaf/code/solana-twitter/tests/solana-twitter.ts:7:38)
at Object.create (/home/sadaf/code/solana-twitter/node_modules/mocha/lib/interfaces/common.js:148:19)
at context.describe.context.context (/home/sadaf/code/solana-twitter/node_modules/mocha/lib/interfaces/bdd.js:42:27)
at Object.<anonymous> (/home/sadaf/code/solana-twitter/tests/solana-twitter.ts:5:1)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Module.m._compile (/home/sadaf/code/solana-twitter/node_modules/ts-node/src/index.ts:439:23)
at Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Object.require.extensions.(anonymous function) [as .ts] (/home/sadaf/code/solana-twitter/node_modules/ts-node/src/index.ts:442:12)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object.implementationOfRequireOrImportForUnstableEsm [as requireOrImport] (/home/sadaf/code/solana-twitter/node_modules/mocha/lib/nodejs/esm-utils.js:116:12)
at Object.exports.loadFilesAsync (/home/sadaf/code/solana-twitter/node_modules/mocha/lib/nodejs/esm-utils.js:103:34)
at process._tickCallback (internal/process/next_tick.js:68:7)
at Function.Module.runMain (internal/modules/cjs/loader.js:834:11)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Updating Node to the latest version solved it for me.
I follow through installation tutorial by Apollo. And I totally confident that I did everything as is described in installation tutorial. However, when during the build of the project I received the compiler errors like:
TypeError: Cannot read property 'length' of undefined
at Object.yargs.command.command.command.argv [as handler] (/usr/local/lib/node_modules/apollo-codegen/src/cli.js:186:17)
at Object.runCommand (/usr/local/lib/node_modules/apollo- codegen/node_modules/yargs/lib/command.js:235:44)
at Object.parseArgs [as _parseArgs] (/usr/local/lib/node_modules/apollo-codegen/node_modules/yargs/yargs.js:1013:30)
at Object.get [as argv] (/usr/local/lib/node_modules/apollo-codegen/node_modules/yargs/yargs.js:957:21)
at Object.<anonymous> (/usr/local/lib/node_modules/apollo-codegen/lib/cli.js:197:5)
at Module._compile (module.js:660:30)
at Object.Module._extensions..js (module.js:671:10)
at Module.load (module.js:573:32)
at tryModuleLoad (module.js:513:12)
at Function.Module._load (module.js:505:3)
Command /bin/sh failed with exit code 1
and
++ exec apollo-codegen generate --schema schema.json --output API.swift
TypeError: Cannot read property 'length' of undefined
at Object.yargs.command.command.command.argv [as handler] (/usr/local/lib/node_modules/apollo-codegen/src/cli.js:186:17)
at Object.runCommand (/usr/local/lib/node_modules/apollo-codegen/node_modules/yargs/lib/command.js:235:44)
at Object.parseArgs [as _parseArgs] (/usr/local/lib/node_modules/apollo-codegen/node_modules/yargs/yargs.js:1013:30)
at Object.get [as argv] (/usr/local/lib/node_modules/apollo-codegen/node_modules/yargs/yargs.js:957:21)
at Object.<anonymous> (/usr/local/lib/node_modules/apollo-codegen/lib/cli.js:197:5)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
Command PhaseScriptExecution failed with a nonzero exit code
Why I receive this errors?
After spending a lot of time and did searches I understood why errors appeared. Tanks to #NiltiakSivad for her answer on GitHub issue discussion
Apollo script trying to find a file with the extension .graphql in a project folder with appropriates queries or mutations. If they do not exist, probably you will error as above. I think that Apollo team should warn their audience about such possible case in installation tutorial!
So, in order to successfully run the project make sure:
You're Apollo version compatible with apollo-codegen
You correctly add Apollo script
You have schema.json in the project folder
You have file with the extension .graphql in a project folder that
contains appropriates your schema.json query or mutation
My Jenkins is running on CentOS 6 with node.js 0.10.15 and bower 1.0.3.
I have a shell task which executes the following:
npm install
bower install
grunt clean package
The bower installation fails when building:
+ bower install
path.js:360
throw new TypeError('Arguments to path.join must be strings');
^
TypeError: Arguments to path.join must be strings
at path.js:360:15
at Array.filter (native)
at Object.exports.join (path.js:358:36)
at Object.<anonymous> (/usr/lib/node_modules/bower/node_modules/
update-notifier/node_modules/configstore/configstore.js:9:7)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
Build step 'Execute shell' marked build as failure
When I'm executing bower install in a terminal while logged in as the Jenkins user, it works. The other mentioned commands work as expected (npm, grunt).
Any ideas?
It appears that your execution environment has neither $XDG_CONFIG_HOME nor $HOME set as environment variables.
You can work around this by manually setting it, for example, to the current workspace:
export XDG_CONFIG_HOME="$WORKSPACE/.config"
...
bower install