Currently getting this error when i try to run eslint locally:
Error: Cannot find module 'escope'
at Function.Module._resolveFilename (module.js:455:15)
at monkeypatch (/Users/pablorincon/Documents/SSENSE/micro-services/ws-website/services/ui-website/node_modules/babel-eslint/index.js:53:26)
at Object.exports.parse (/Users/pablorincon/Documents/SSENSE/micro-services/ws-website/services/ui-website/node_modules/babel-eslint/index.js:358:5)
at parse (/Users/pablorincon/Documents/SSENSE/micro-services/ws-website/services/ui-website/node_modules/eslint/lib/linter.js:671:23)
at Linter.verify (/Users/pablorincon/Documents/SSENSE/micro-services/ws-website/services/ui-website/node_modules/eslint/lib/linter.js:806:27)
at processText (/Users/pablorincon/Documents/SSENSE/micro-services/ws-website/services/ui-website/node_modules/eslint/lib/cli-engine.js:278:31)
at processFile (/Users/pablorincon/Documents/SSENSE/micro-services/ws-website/services/ui-website/node_modules/eslint/lib/cli-engine.js:320:18)
at executeOnFile (/Users/pablorincon/Documents/SSENSE/micro-services/ws-website/services/ui-website/node_modules/eslint/lib/cli-engine.js:655:25)
at fileList.forEach.fileInfo (/Users/pablorincon/Documents/SSENSE/micro-services/ws-website/services/ui-website/node_modules/eslint/lib/cli-engine.js:693:13)
at Array.forEach (native)
What's weird is that im using the same linting configuration with another project, and i had no issues at all.
I'm using:
babel-eslint#7.1.1
eslint#4.0.0-beta.0
Any ideas ?
Even though I had same package.json, babel-eslint was set as "7.1.1" in one and "^7.1.1" in the other.
Basically ESLint v4 uses a new fork of escope, which was then updated on version 7.2.3 of babel-eslint.
So, adding the little ^ to my configuration fixed my problem.
Related
Got this error message Definition for rule 'testing-library/no-debug' was not found. right after VSCode update. Tried to install #types/testing-library, it didn't help.
Find testing-library/no-debug in your Eslint config then change it to testing-library/no-debugging-utils.
Ref:
https://github.com/testing-library/eslint-plugin-testing-library/blob/main/docs/migration-guides/v5.md#steps-to-upgrade
While trying to troubleshoot another issue with my project, I must've broken something along the way, but I have no idea how to fix this.
These are my import statements for the project:
pragma solidity >=0.6.6;
import "#openzeppelin/contracts/token/ERC721/ERC721.sol";
import "#chainlink/contracts/src/v0.6/VRFConsumerBase.sol";
And this is my brownie-config.yaml
depencencies:
- OpenZeppelin/openzeppelin-contracts#3.4.0
- smartcontractkit/chainlink-brownie-contracts#1.0.2
compiler:
solc:
remappings:
- '#openzeppelin=OpenZeppelin/openzeppelin-contracts#3.4.0'
- '#chainlink=smartcontractkit/chainlink-brownie-contracts#1.0.2'
But despite all this working until yesterday, trying to compile only gives me these errors:
PS C:\Users\XXX\Desktop\Project> brownie compile
INFO: Could not find files for the given pattern(s).
Brownie v1.16.4 - Python development framework for Ethereum
New compatible solc version available: 0.6.6
Compiling contracts...
Solc version: 0.6.6
Optimizer: Enabled Runs: 200
EVM Version: Istanbul
CompilerError: solc returned the following errors:
contracts/AdvancedCollectible.sol:3:1: ParserError: Source "OpenZeppelin/openzeppelin-contracts#3.4.0/contracts/token/ERC721/ERC721.sol" not found: File not found.
import "#openzeppelin/contracts/token/ERC721/ERC721.sol";
^-------------------------------------------------------^
contracts/AdvancedCollectible.sol:4:1: ParserError: Source "smartcontractkit/chainlink-brownie-contracts#1.0.2/contracts/src/v0.6/VRFConsumerBase.sol" not found: File not found.
import "#chainlink/contracts/src/v0.6/VRFConsumerBase.sol";
^---------------------------------------------------------^
How do I solve this?
I've seen some answers to similar issues referencing node.js or local copies of the stuff I'm trying to import, but isn't this command supposed to pull stuff off github?
Why is it failing to do so out of nowhere?
Install Openzeppelin at the root of your folder by using npm
npm i #openzeppelin/contracts
same thing for Chainlink
This is because the solidity extension is looking in the wrong directory.
Below step fixed the issue for me -
Change the settings in Solidity extension in VSCode.
The default settings include: "solidity.packageDefaultDependenciesContractsDirectory": "contracts" Users need to change the setting from contracts to an empty string. "solidity.packageDefaultDependenciesContractsDirectory": ""
Source - https://github.com/juanfranblanco/vscode-solidity/issues/178
I'm trying to use 'react-responsive' but I am getting the error message - Unknown plugin "add-module-exports
It looks like this relates to the fact that node_modules needs to be excluded but due to a bug in babel v6 (fixed in v7) adding "ignore": "node_modules" to the .babelrc file doesn't work.
https://github.com/contra/react-responsive/issues/131
It seems like parcel-bundler uses babel v6 so my question is , how can I ignore node_modules and get parcel to bundle without throwing an error?
I was facing a similar issue recently with parcel, installing babel-plugin-add-module-exports seemed to fix the issue
Upon installing ember-cli i wanted to install the coffeescript add on using:
ember install ember-cli-coffeescript
as shown in the documentation but I get the error:
WARNING: Skipping npm install: package.json not found
package.json not found
Cannot read property 'then' of undefined
TypeError: Cannot read property 'then' of undefined
at Class.run (/home/daniel/.nvm/versions/node/v7.6.0/lib/node_modules/ember-cli/lib/tasks/addon-install.js:43:7)
at Class.run (/home/daniel/.nvm/versions/node/v7.6.0/lib/node_modules/ember-cli/lib/commands/install.js:39:25)
at Class.<anonymous> (/home/daniel/.nvm/versions/node/v7.6.0/lib/node_modules/ember-cli/lib/models/command.js:241:20)
at initializePromise (/home/daniel/.nvm/versions/node/v7.6.0/lib/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:588:5)
at PromiseExt.Promise (/home/daniel/.nvm/versions/node/v7.6.0/lib/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:1076:31)
at new PromiseExt (/home/daniel/.nvm/versions/node/v7.6.0/lib/node_modules/ember-cli/lib/ext/promise.js:32:8)
at Class.validateAndRun (/home/daniel/.nvm/versions/node/v7.6.0/lib/node_modules/ember-cli/lib/models/command.js:195:12)
at /home/daniel/.nvm/versions/node/v7.6.0/lib/node_modules/ember-cli/lib/cli/cli.js:130:22
at tryCatch (/home/daniel/.nvm/versions/node/v7.6.0/lib/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:538:12)
at invokeCallback (/home/daniel/.nvm/versions/node/v7.6.0/lib/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:553:13)
I don't understand what this means. I have seen this question asked in different contexts for Angular.js but those questions are related to peoples code. This question is related to the installation itself. this is a brandnew project and install.
Any ideas?
package.json file usually in the project root, called package.json - this file holds various metadata relevant to the project. This file is used to give information to npm that allows it to identify the project as well as handle the project's dependencies.
Make sure you have a proper inited Ember project. If you do not have a package.json file. Try to re-init your project using Ember init inside your project folder.
Attention: the init process may overwrite the existing files in your project. Backup if it is important.
Have you tried adding a package.json file? Easily done by running npm init
Maybe I am making a fundamental error, but I assume you have to install the Import / Export plugin on IP3.9 to make the zip file before you import it to the new ip4.1 site ?
The plugin will not install in IP3.9 there is an error "plugin.ini doesn't exist"
The Import / Export plugin is not in the IP3.x format
ip_plugins/group_name/plugin_name/files
so I do not see how it can be installed.
If I try exporting data from IP4.1 I get the following error message
Error:
Fatal error: Call to undefined method Ip\Page::getType() in /var/www/ip41/Plugin/ImportExport/ManagerExport.php on line 207
I am probably doing something stupid, but I cannot see what
Alan
For v3.x version you must download a 3.x branch of the plugin - https://github.com/impresspages-plugins/ImportExport/tree/3.x
For the error in v4.1 open an issue on GitHub - https://github.com/impresspages-plugins/ImportExport/issues
I hope it does make sense now.