Fail to build the master branch of Chart.js - build

I did git clone Chart.js from github and then npx gulp build failed. Error message was "sourcemap is not a supported option".
I'm using node v10.16.2 and npm 6.9.0.
I did
git clone https://github.com/chartjs/Chart.js.git
cd Chart.js
npm install
npx gulp build
And I got
% npx gulp build
[11:19:05] Using gulpfile ~/tmp/chartjs-debug/Chart.js/gulpfile.js
[11:19:05] Starting 'build'...
src/index.js → dist/Chart.js...
created dist/Chart.js in 1.3s
src/index.js → dist/Chart.min.js...
`sourcemap` is not a supported option
[!] (terser plugin) Error: `sourcemap` is not a supported option
DefaultsError: `sourcemap` is not a supported option
at a.get (/home/ubuntu/tmp/chartjs-debug/Chart.js/node_modules/rollup-plugin-terser/node_modules/terser/dist/bundle.min.js:1:463)
at reportError (/home/ubuntu/tmp/chartjs-debug/Chart.js/node_modules/jest-worker/build/child.js:75:11)
at execMethod (/home/ubuntu/tmp/chartjs-debug/Chart.js/node_modules/jest-worker/build/child.js:93:5)
at process.on (/home/ubuntu/tmp/chartjs-debug/Chart.js/node_modules/jest-worker/build/child.js:40:7)
at process.emit (events.js:198:13)
at emit (internal/child_process.js:832:12)
at process._tickCallback (internal/process/next_tick.js:63:19)
[11:19:07] 'build' errored after 2.72 s
[11:19:07] Error: 1
at formatError (/home/ubuntu/tmp/chartjs-debug/Chart.js/node_modules/gulp/node_modules/gulp-cli/lib/versioned/^4.0.0/format-error.js:21:10)
at Gulp.<anonymous> (/home/ubuntu/tmp/chartjs-debug/Chart.js/node_modules/gulp/node_modules/gulp-cli/lib/versioned/^4.0.0/log/events.js:33:15)
at Gulp.emit (events.js:203:15)
at Gulp.EventEmitter.emit (domain.js:448:20)
at Object.error (/home/ubuntu/tmp/chartjs-debug/Chart.js/node_modules/undertaker/lib/helpers/createExtensions.js:61:10)
at handler (/home/ubuntu/tmp/chartjs-debug/Chart.js/node_modules/now-and-later/lib/map.js:50:14)
at f (/home/ubuntu/tmp/chartjs-debug/Chart.js/node_modules/once/once.js:25:25)
at f (/home/ubuntu/tmp/chartjs-debug/Chart.js/node_modules/once/once.js:25:25)
at tryCatch (/home/ubuntu/tmp/chartjs-debug/Chart.js/node_modules/async-done/index.js:24:15)
at done (/home/ubuntu/tmp/chartjs-debug/Chart.js/node_modules/async-done/index.js:40:12)
at onError (/home/ubuntu/tmp/chartjs-debug/Chart.js/node_modules/async-done/index.js:51:5)
at process._tickCallback (internal/process/next_tick.js:68:7)
%
Any idea? Thanks!

Related

Error HH801: Plugin #nomicfoundation/hardhat-toolbox requires the following dependencies to be installed:

yarn hardhat
yarn run v1.22.19
$ D:\Codeing\Blockchain\hardhat\node_modules\.bin\hardhat
Error HH801: Plugin #nomicfoundation/hardhat-toolbox requires the following dependencies to be installed: #ethersproject/providers, #nomicfoundation/hardhat-network-helpers, #nomicfoundation/hardhat-chai-matchers, #nomiclabs/hardhat-ethers, #nomiclabs/hardhat-etherscan, #types/chai, #types/mocha, #typechain/ethers-v5, #typechain/hardhat, chai, ethers, hardhat-gas-reporter, solidity-coverage, ts-node, typechain, typescript.
Please run: npm install --save-dev "#ethersproject/providers#^5.4.7" "#nomicfoundation/hardhat-network-helpers#^1.0.0" "#nomicfoundation/hardhat-chai-matchers#^1.0.0" "#nomiclabs/hardhat-ethers#^2.0.0" "#nomiclabs/hardhat-etherscan#^3.0.0" "#types/chai#^4.2.0" "#types/mocha#>=9.1.0" "#typechain/ethers-v5#^10.1.0" "#typechain/hardhat#^6.1.2" "chai#^4.2.0" "ethers#^5.4.7" "hardhat-gas-reporter#^1.0.8" "solidity-coverage#^0.8.1" "ts-node#>=8.0.0" "typechain#^8.1.0" "typescript#>=4.5.0"
Hi i am facing this issues..when tring to yarn hardhat

Solana Anchor Lang: anchor init creates project with TypeError: Cannot read properties of undefined (reading 'methods')

Confused about what could have caused this to stop working, I installed solana and anchor and was able to test projects.
anchor --version anchor-cli 0.26.0
nvm use 16.16.0
Now using node v16.16.0 (npm v8.11.0)
anchor init hello-world
yarn install v1.22.19
warning package.json: No license field
info No lockfile found.
warning No license field
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Saved lockfile.
Done in 6.07s.
Initialized empty Git repository in /home/user/Code/anchor-second-test/hello-world/.git/
hello-world initialized
cd hello-world && anchor build works. Making no changes, I run anchor run test
1) hello-world
Is initialized!:
TypeError: Cannot read properties of undefined (reading 'methods')
at /home/user/Code/anchor-second-test/hello-world/tests/hello-world.ts:13:30
at Generator.next (<anonymous>)
at /home/user/Code/anchor-second-test/hello-world/tests/hello-world.ts:31:71
at new Promise (<anonymous>)
at __awaiter (tests/hello-world.ts:27:12)
at Context.<anonymous> (tests/hello-world.ts:11:36)
at processImmediate (node:internal/timers:466:21)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Here is hello-world.ts test file as generated:
import { Program } from "#project-serum/anchor";
import { HelloWorld } from "../target/types/hello_world";
describe("hello-world", () => {
// Configure the client to use the local cluster.
anchor.setProvider(anchor.AnchorProvider.env());
const program = anchor.workspace.HelloWorld as Program<HelloWorld>;
it("Is initialized!", async () => {
// Add your test here.
const tx = await program.methods.initialize().rpc();
console.log("Your transaction signature", tx);
});
});
I have tried using node lts 16.16.0 instead of the latest lts, starting in a clean directory, checking that typescript was installed, running yarn install before running anchor build command. I checked that the solana keypair and json file was generated in the correct folder.
Go to this ../target/types/hello_world directory and make sure it exports like this
export type HelloWorld = {}
since you have this import
import { HelloWorld } from "../target/types/hello_world";
also, you did not show anchor import . It should be
import * as anchor from "#project-serum/anchor";

I am getting this error while making a project in expo using this command-> expo init project-name

? Choose a template: blank
[16:22:15] Extracting project files...
Process exited with non-zero code: 2
ERROR: Unexpected end of data : blank-30.1.0.tar
Process exited with non-zero code: 2
[16:22:17] zlib: unexpected end of file
[16:22:17] Set EXPO_DEBUG=true in your env to view the stack trace.
I had the same issue today but I found the answer.
The file blank-30.1.0.tar was not downloaded correctly. Trying to clear the npm cache won't help, because expo has its own cache.
Use this command to clear the expo cache on Windows or on Linux:
rm -fr ~/.expo/starter-app-cache
or try to find it on macOS under ~\.exponent\starter-app-cache\
Delete .expo folder
Run
npm -g uninstall expo-cli --save
npm install -g expo-cli#latest
expo init <project-name>
Bingo!
I have manually deleted my file from .expo folder. As my system not recognize rm -fr command.
You can find cache file in c:/users/$userName/.expo in windows.

Ember serve doesn't work (Error: Couldn't find preset "es2015")

I am building a web app using Ember. I created the project with ember new test-app and have made no changes to the generated files. When I run ember serve, I immediately receive the following error:
The Broccoli Plugin: [BroccoliMergeTrees: Addon#compileAddon(ember-welcome-page) ] failed with:
Error: Couldn't find preset "es2015" relative to directory "/Users/jacob"
at /Users/jacob/Desktop/test-app/node_modules/babel-core/lib/transformation/file/options/option-manager.js:293:19
at Array.map ()
at OptionManager.resolvePresets (/Users/jacob/Desktop/test-app/node_modules/babel-core/lib/transformation/file/options/option-manager.js:275:20)
at OptionManager.mergePresets (/Users/jacob/Desktop/test-app/node_modules/babel-core/lib/transformation/file/options/option-manager.js:264:10)
at OptionManager.mergeOptions (/Users/jacob/Desktop/test-app/node_modules/babel-core/lib/transformation/file/options/option-manager.js:249:14)
at OptionManager.init (/Users/jacob/Desktop/test-app/node_modules/babel-core/lib/transformation/file/options/option-manager.js:368:12)
at File.initOptions (/Users/jacob/Desktop/test-app/node_modules/babel-core/lib/transformation/file/index.js:212:65)
at new File (/Users/jacob/Desktop/test-app/node_modules/babel-core/lib/transformation/file/index.js:135:24)
at Pipeline.transform (/Users/jacob/Desktop/test-app/node_modules/babel-core/lib/transformation/pipeline.js:46:16)
at Promise (/Users/jacob/Desktop/test-app/node_modules/broccoli-babel-transpiler/lib/parallel-api.js:102:26)
The broccoli plugin was instantiated at:
at BroccoliMergeTrees.Plugin (/Users/jacob/Desktop/test-app/node_modules/broccoli-plugin/index.js:7:31)
at new BroccoliMergeTrees (/Users/jacob/Desktop/test-app/node_modules/ember-cli/node_modules/broccoli-merge-trees/index.js:16:10)
at Function.BroccoliMergeTrees [as _upstreamMergeTrees] (/Users/jacob/Desktop/test-app/node_modules/ember-cli/node_modules/broccoli-merge-trees/index.js:10:53)
at mergeTrees (/Users/jacob/Desktop/test-app/node_modules/ember-cli/lib/broccoli/merge-trees.js:85:33)
at Class.compileAddon (/Users/jacob/Desktop/test-app/node_modules/ember-cli/lib/models/addon.js:1092:12)
at Class.treeForAddon (/Users/jacob/Desktop/test-app/node_modules/ember-cli/lib/models/addon.js:746:26)
at Class.treeForAddon (/Users/jacob/Desktop/test-app/node_modules/ember-welcome-page/index.js:27:41)
at Class.superWrapper [as treeForAddon] (/Users/jacob/Desktop/test-app/node_modules/core-object/lib/assign-properties.js:34:20)
at Class._treeFor (/Users/jacob/Desktop/test-app/node_modules/ember-cli/lib/models/addon.js:557:33)
at Class.treeFor (/Users/jacob/Desktop/test-app/node_modules/ember-cli/lib/models/addon.js:517:21)
I referred to this question for help, but I still received the same error after trying the solution.
I am running ember-cli v2.16.2 and node v8.9.0 on macOS High Sierra. In my node installation, the only three global modules I have installed are bower, broccoli-cli, and ember-cli.
Please do clean reinstall of ember-cli package.
npm uninstall -g ember-cli
npm cache clean --force
npm install -g ember-cli
Then run your ember new command once again and test it.

Ember build failing

I can't build my ember app, I get this error message. Tried
rm -rf node_modules bower_components dist tmp
And installed npm and bower again but it didn't work
The Broccoli Plugin: [SourceMapConcat: Concat: Vendor /assets/vendor.js] failed with:
Error: ENOENT: no such file or directory, stat '/home/ubuntu/workspace/qr-prototype/configtool-ember/tmp/source_map_concat-input_base_path-DgleBN9U.tmp/0/bower_components/keyboard/dist/js/jquery.keyboard.js'
at Error (native)
at Object.fs.statSync (fs.js:844:18)
at ConcatWithMaps.keyForFile (/home/ubuntu/workspace/qr-prototype/configtool-ember/node_modules/ember-cli/node_modules/broccoli-concat/node_modules/broccoli-caching-writer/index.js:90:20)
at Array.map (native)
at ConcatWithMaps.CachingWriter._conditionalBuild (/home/ubuntu/workspace/qr-prototype/configtool-ember/node_modules/ember-cli/node_modules/broccoli-concat/node_modules/broccoli-caching-writer/index.js:112:65)
at /home/ubuntu/workspace/qr-prototype/configtool-ember/node_modules/ember-cli/node_modules/broccoli-concat/node_modules/broccoli-caching-writer/node_modules/broccoli-plugin/read_compat.js:61:34
at lib$rsvp$$internal$$tryCatch (/home/ubuntu/workspace/qr-prototype/configtool-ember/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:1036:16)
at lib$rsvp$$internal$$invokeCallback (/home/ubuntu/workspace/qr-prototype/configtool-ember/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:1048:17)
at lib$rsvp$$internal$$publish (/home/ubuntu/workspace/qr-prototype/configtool-ember/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:1019:11)
at lib$rsvp$asap$$flush (/home/ubuntu/workspace/qr-prototype/configtool-ember/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:1198:9)
The broccoli plugin was instantiated at:
at ConcatWithMaps.Plugin (/home/ubuntu/workspace/qr-prototype/configtool-ember/node_modules/ember-cli/node_modules/broccoli-concat/node_modules/broccoli-caching-writer/node_modules/broccoli-plugin/index.js:10:31)
at ConcatWithMaps.CachingWriter [as constructor] (/home/ubuntu/workspace/qr-prototype/configtool-ember/node_modules/ember-cli/node_modules/broccoli-concat/node_modules/broccoli-caching-writer/index.js:21:10)
at new ConcatWithMaps (/home/ubuntu/workspace/qr-prototype/configtool-ember/node_modules/ember-cli/node_modules/broccoli-concat/concat.js:22:17)
at module.exports (/home/ubuntu/workspace/qr-prototype/configtool-ember/node_modules/ember-cli/node_modules/broccoli-concat/index.js:26:10)
at EmberApp.concatFiles (/home/ubuntu/workspace/qr-prototype/configtool-ember/node_modules/ember-cli/lib/broccoli/ember-app.js:329:10)
at EmberApp.javascript (/home/ubuntu/workspace/qr-prototype/configtool-ember/node_modules/ember-cli/lib/broccoli/ember-app.js:1190:12)
at EmberApp.toArray (/home/ubuntu/workspace/qr-prototype/configtool-ember/node_modules/ember-cli/lib/broccoli/ember-app.js:1542:10)
at EmberApp.toTree (/home/ubuntu/workspace/qr-prototype/configtool-ember/node_modules/ember-cli/lib/broccoli/ember-app.js:1564:30)
at module.exports (/home/ubuntu/workspace/qr-prototype/configtool-ember/ember-cli-build.js:35:14)
at Class.module.exports.Task.extend.setupBroccoliBuilder (/home/ubuntu/workspace/qr-prototype/configtool-ember/node_modules/ember-cli/lib/models/builder.js:55:19)
Solved It, I was importing some bower components on my ember-cli-build.js that weren't properly installed. I manually installed with bower install keyboard and it worked.
app.import('bower_components/keyboard/dist/js/jquery.keyboard.js');
app.import('bower_components/keyboard/dist/css/keyboard.min.css');
app.import('bower_components/keyboard/dist/css/keyboard-previewkeyset.min.css');
app.import('bower_components/keyboard/dist/js/jquery.keyboard.extension-all.min.js');