When compiling the hardhat project When it's showing Nothing to Compile.
{
"name": "HardhAtToken",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"#nomiclabs/hardhat-ethers": "^2.0.6",
"#nomiclabs/hardhat-waffle": "^2.0.3",
"chai": "^4.3.6",
"ethereum-waffle": "^3.4.4",
"ethers": "^5.6.6",
"hardhat": "^2.9.6-dev.1"
},
"dependencies": {
"glob": "^7.2.0"
}
}
Hardhat keeps a cache of compiled contracts in the cache project folder.
The npx hardhat compile command only compiles files that have not been changed since the last compilation. So the "nothing to compile" message is expected in your case.
You can either clear the cache using npx hardhat clean, or force recompilation of cached sources using the npx hardhat compile --force argument.
Docs: https://hardhat.org/guides/compile-contracts.html
The major issue with that you haven't created a contracts directory in your code.Then you can implement sol file in it and run npx hardhat compile..It was worked for me...
Related
I'm trying to deploy my portfolio website using AWS S3, CloudFront, CodePipeline, and Travis CI.
Everything works fine, but Travis CI build keeps failing.
gatsby build gives me an error with:
error #98123 WEBPACK
Generating JavaScript bundles failed
This question is very similar to mine, but the solution was irrelevant to mine because I don't have yarn file and I tried reinstalling my npm dependencies.
Here is the copy of my logs:
Generating JavaScript bundles failed
Can't resolve '../components/Layout' in '/home/travis/build/stomg7969/react-portfolio/src/pages'
File: src/pages/index.js
See our docs page for more info on this error: https://gatsby.dev/issue-how-to
error #98123 WEBPACK
Generating JavaScript bundles failed
Can't resolve '../components/Layout' in '/home/travis/build/stomg7969/react-portfolio/src/pages'
File: src/pages/404.js
See our docs page for more info on this error: https://gatsby.dev/issue-how-to
The command "gatsby clean && gatsby build" exited with 1.
store build cache
Done. Your build exited with 1.
And here is my package.json.
"name": "gatsby-starter-spectral",
"version": "0.0.1",
"description": "Gatsby.js V2 starter template based on Spectral by HTML5 UP",
"repository": {
"type": "git",
"url": "git+https://github.com/anubhavsrivastava/gatsby-starter-spectral.git"
},
"author": {
"name": "Anubhav Srivastava",
"email": "anubhav.srivastava00#gmail.com"
},
"dependencies": {
"gatsby": "^2.13.39",
"gatsby-plugin-manifest": "^2.2.3",
"gatsby-plugin-offline": "^2.1.0",
"gatsby-plugin-react-helmet": "^3.0.12",
"gatsby-plugin-sass": "^2.0.11",
"node-sass": "^4.12.0",
"react": "^16.8.6",
"react-dom": "^16.8.6",
"react-helmet": "^5.2.1",
"react-images": "1.0.0",
"react-scrollspy": "^3.4.0",
"smoothscroll-polyfill": "^0.4.4"
},
"scripts": {
"develop": "gatsby develop",
"build": "npm run clean && gatsby build",
"deploy": "npm run clean && gatsby build --prefix-paths && gh-pages -d public",
"serve": "gatsby serve",
"clean": "rimraf .cache public",
"format": "prettier --write '**/*.js'",
"test": "echo \"Error: no test specified\" && exit 1"
},
"devDependencies": {
"gh-pages": "^2.0.1",
"prettier": "^1.17.0",
"rimraf": "^2.6.3"
},
"keywords": [
"gatsby",
"gatsby-starter",
"gatsby-starter-spectral"
],
"license": "MIT",
"bugs": {
"url": "https://github.com/anubhavsrivastava/gatsby-starter-spectral/issues"
},
"homepage": "https://github.com/anubhavsrivastava/gatsby-starter-spectral#readme"
}
Lastly, this is my .travis.yml file.
language: node_js
node_js:
- 11.8.0
install: npm install
script: gatsby clean && gatsby build
deploy:
provider: s3
access_key_id: $AWS_KEY
secret_access_key: $AWS_SECRET
bucket: 'thedevelopark.com'
skip_cleanup: true
acl: public_read
local_dir: public
Thank you in advance for your feedback.
I've had the same problem and tried and checked case-sensitivity a thousand times. Wouldn't do anything.
Then I changed the name of the component in all areas, filename, import, export, you name it. Now it works.
I don't know if Netlify had a problem with my component's name "Socials"? Guess I'll never find out.
I need to run cucumber tests using puppeteer and chai but exclude that scenario that has tag #ignore.
This should be probably set up in package.json under scripts and "test" line. But I donĀ“t know how...
Here is code
{
"name": "cucumber-puppeteer-example",
"description": "Example project on how to use cucumber with puppeteer",
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
"scripts": {
"build": "rimraf build out && tsc",
"build:watch": "rimraf build && tsc -w",
"test": "cucumber-js --require \"build/**/*.js\"",
"test:headless": "cross-env CLS_TEST_HEADLESS=false cucumber-js --require \"build/**/*.js\"",
"test:local": "rimraf out && cross-env CLS_TEST_HEADLESS=false CLS_TEST_URL=http://localhost:4200 cucumber-js --require \"build/**/*.js\"",
"e2e": "ts-node",
"chromium": "ts-node ci-chromium-install.ts linux 641577",
"lint": "tslint --project tsconfig.json -c tslint.json"
},
"devDependencies": {
"#types/chai": "4.1.7",
"#types/cucumber": "4.0.5",
"#types/puppeteer": "1.12.3",
"chai": "4.2.0",
"chromium": "^2.1.0",
"cross-env": "5.2.0",
"cucumber": "5.1.0",
"puppeteer": "1.14.0",
"ts-node": "8.0.3",
"tslint": "^5.16.0",
"tslint-no-unused-expression-chai": "^0.1.4",
"typescript": "3.3.4000",
"unzip": "0.1.11"
}
}
Anyone know how to put somthing like this ~#ingore to ignore all tagged scenarios here to package.json?
Create a separate class with the name cucumberOpts.ts/ js like below:
{
"compiler": "ts:ts-node/register",
"projectName": {
"tags": {
"ui": ["#Ui", "~#Ignore"],
"api": ["#Api", "~#Ignore"]
}
}
}
and use this class in your package.json file like as below:
"scripts": {
"e2e": "cucumber-js ./src/test/features --cucumberOpts.compiler -f node_modules/cucumber-pretty --format json:cucumber-json-report.json --cucumberOpts.projectName.tags.ui"
}
Use #Ignore tag before your scenario which you need to skip and run 'npm run e2e' command from your terminal. This will consider all scenario's which are tagged wit #Ui and will skip all the features which are tagged with #Ignore. If you include both the tags for same scenario, that scenario will be skipped
Add a before step to your hook and return 'pending'
I'm trying to use the npm package grunt-package-modules to gather my npm_module dependencies for a bundled deployment but ran into the error when running the command grunt packageModules:
Fatal error: Refusing to install test as a dependency of itself
This error typically occurs when the name of the project also appears in the list of dependencies in package.json as was the case here, but that does not occur in the original file or the one that is copied into the dist folder.
I was able to get this error with the simplest project setup I could create from the examples given in the grunt tutorial and the package wiki. Is there something I'm missing in setting up this plugin?
package.json
{
"name": "test",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"underscore": "^1.8.3"
},
"devDependencies": {
"grunt": "^1.0.1",
"grunt-package-modules": "^1.0.0"
}
}
Gruntfile.js
module.exports = function(grunt) {
grunt.initConfig({
packageModules: {
dist: {
src: 'package.json',
dest: 'dist'
},
}
});
grunt.loadNpmTasks('grunt-package-modules');
}
I'm on a PC and had the same thing happen on my home PC but had my co-worker run through this same setup on his mac and it worked successfully for him. Also tried updating node and npm since we had different versions with no luck.
I am trying to build sample UWP app using react-native. Here is my package.JSON.
` {
"name": "netizen_uwp",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start"
},
"dependencies": {
"react": "15.2.0-rc.1",
"react-native": "0.29.0-rc.0",
"react-native-windows": "0.29.0-rc.0"
},
"main": "index.android.js",
"devDependencies": {
"rnpm-plugin-windows": "^0.1.1"
},
"author": "",
"license": "ISC",
"description": ""
}`
When i run >rnpm windows,I am getting attached error even all my react/react-native/react-native-windows modules are latest.
Can some one help me here?
This is a general problem with react-native-windows being a plugin. We're always slightly behind the release train for react-native. You could have solved this problem using the --windowsVersion flag, as in:
rnpm windows --windowsVersion 0.29.0-rc.0
Also, as of react-native#>=0.31, you no longer need to use the rnpm global command line, and instance just use the command "react-native windows".
I'm a big fan of bower. I don't need to put a stack of packages in my repository, I just commit bower.json each time and I'm done.
So my question really is, can I make npm read from a json file in the same way that bower does?
npm has package.json. This file has dependencies and devDependencies parts. You can use this file similar to bower.json.
npm install
will install necessary dependencies to your project's node_modules directory.
See sample package.json below.
{
"name": "SampleMobileApp",
"version": "0.0.1",
"description": "Sample App",
"dependencies": {
"grunt": "~0.4.2",
},
"devDependencies": {
"grunt": "~0.4.2",
"grunt-contrib-jshint": "~0.8.0",
"grunt-open": "~0.2.3",
"grunt-contrib-copy": "~0.5.0",
"grunt-bowercopy": "~0.7.1",
"grunt-contrib-watch": "~0.5.3",
"grunt-phonegap": "~0.12.0"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [
"grunt",
"javascript"
],
"author": "Atilla Ozgur",
"license": "MIT",
}
dependencies are your runtime dependencies that your users need to download while devDependencies are your developer dependencies like your test runtime, grunt helper packages etc.