Parser Error of import Openzeppelin while compiling solidity code - solidity

Retrieving compiler information:
Compiler using remote version: 'latest', solidity version: 0.8.17+commit.8df45f5f.Emscripten.clang
ParserError: Expected string literal (path), "*" or alias list.
--> c:/Users/manis/Desktop/React_Native/contracts/NFTMarketplace.sol:6:8:
|
6 | import “#openzeppelin/contracts/utils/Counters.sol”;
| ^
Compilation failed with 1 errors
Please Tell me something about this error.

try in your console, in the main project folder:
yarn add #openzeppelin/contracts
also, check your node_modules folder.

Related

After make an npm update the console shows Error: Module not found: Error: Can't resolve 'angular2-moment'

I was trying to install jquery on my Angular project and after write some jquery dependency on package.json doc and type npm update, the console says Error: Module not found: Error: Can't resolve 'angular2-moment'.
Error occurs in the template of component RegisterComponent.
** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **
× Failed to compile.
✔ Browser application bundle generation complete.
Initial Chunk Files | Names | Raw Size
main.js | main | 83.62 kB |
runtime.js | runtime | 6.51 kB |
4 unchanged chunks
Build at: 2023-01-10T02:39:00.432Z - Hash: 2a1b1b37176d6913 - Time: 536ms
./src/app/app.module.ts:7:0-47 - Error: Module not found: Error: Can't resolve 'angular2-moment' in 'C:\Users\xxxxxx\Desktop\Proyectos IT\registro_cintas\client\src\app'
Error: src/app/app.component.html:6:34 - error NG8002: Can't bind to 'routerLink' since it isn't a known property of 'a'.
6 <a class="link-home" [routerLink]="['/home']">
continue...
~~~~~~~~~~~~~~~~~~~~~~~~
I tryed installing ngx-moment, angular2-moment again or uninstalling this last one algo I erase the entire folder and made a git clone from the last working commit but nothing, I think the angular2-moment it's not compatible with my Angular version but I don't know what to do.

npm - gulp-sass no longer has a default Sass compiler; please set one yourself

Keep getting this error when trying to build templates
[09:21:08] Requiring external module babel-register
[09:21:19] Using gulpfile ~/GIT/Newsletters/gulpfile.babel.js
[09:21:19] Starting 'build'...
[09:21:19] Starting 'clean'...
[09:21:19] Finished 'clean' after 5.98 ms
[09:21:19] Starting 'pages'...
[09:21:20] Finished 'pages' after 1.96 s
[09:21:20] Starting 'sass'...
Error in plugin "gulp-sass"
Message:
gulp-sass no longer has a default Sass compiler; please set one yourself.
Both the "sass" and "node-sass" packages are permitted.
For example, in your gulpfile:
const sass = require('gulp-sass')(require('sass'));
When I then add const sass = require('gulp-sass')(require('sass')); in my gulpfile.js
It gives this error
[09:41:01] Requiring external module babel-register
{ TypeError: /Users/lde4k1v/GIT/Newsletters/gulpfile.babel.js: Duplicate declaration "sass"
76 |
77 | // Compile Sass into CSS
> 78 | function sass() {
| ^
79 | return gulp.src('src/assets/scss/app.scss')
80 | .pipe($.if(!PRODUCTION, $.sourcemaps.init()))
81 | .pipe($.sass({
Here is my full gulpfile.babel.js
Can someone help me out :( already searched quite some time on it and can't find seem to fix it sadly

"Module build failed..." in Laravel Mix

I did not change anything in app.scss, but when I run npm run watch I get the following errors:
error in ./resources/sass/app.scss
Module build failed (from ./node_modules/sass-loader/lib/loader.js):
Unsupported operation: Cannot extract a file path from a URI with a fragment component
# ./resources/sass/app.scss 2:14-254
Asset Size Chunks Chunk Names
/js/app.js 2.46 MiB /js/app [emitted] /js/app
ERROR in ./resources/sass/app.scss
Module build failed (from ./node_modules/css-loader/index.js):
ModuleBuildError: Module build failed (from ./node_modules/sass-loader/lib/loader.js):
undefined
^
Join(null, "variables"): part 0 was null, but part 1 was not.
#import 'variables';
^^^^^^^^^^^
stdin 2:9 root stylesheet
in C:\Users\TAQI VAHEED\Desktop\#Coding\resPro\resources\sass\app.scss (line 2, column 9)
at runLoaders (C:\Users\TAQI VAHEED\Desktop\#Coding\resPro\node_modules\webpack\lib\NormalModule.js:30
at C:\Users\TAQI VAHEED\Desktop\#Coding\resPro\node_modules\loader-runner\lib\LoaderRunner.js:364:11
at C:\Users\TAQI VAHEED\Desktop\#Coding\resPro\node_modules\loader-runner\lib\LoaderRunner.js:230:18
at context.callback (C:\Users\TAQI VAHEED\Desktop\#Coding\resPro\node_modules\loader-runner\lib\Loader
13)
Any help appreciated.
Finally found the issue. It is related to dart-sass being used instead of node-sass with laravel-mix v4.x.x.
Turns out something related to dart-sass or laravel-mix does not work well with paths containing a '#' symbol. In your case, your app is located at C:\Users\TAQI VAHEED\Desktop\#Coding\resPro and the #Coding folder is creating the error.
Either move your app somewhere else without a '#' symbol in the path OR enable node-sass again by following the steps from laravel-mix 4.0.0 release notes:
you can manually switch back to node-sass, like so:
npm install node-sass
mix.sass('resources/sass/app.sass', 'public/css', {
implementation: require('node-sass')
});
in your webpack.mix.js write the code
mix.js('resources/js/app.js', 'public/js')
.postCss('resources/css/app.css', 'public/css');

React-native on Android - cannot compile app

I followed all the instructions to setup Android but when I try to compile it complains it cannot find the modules required in DetoxTest.java
/Work/mine/detoxJestRn/android/app/src/main/java/com/detoxjestrn/DetoxTest.java:3: error: package android.support.test.filters does not exist
import android.support.test.filters.LargeTest;
^
/Work/mine/detoxJestRn/android/app/src/main/java/com/detoxjestrn/DetoxTest.java:4: error: package android.support.test.rule does not exist
import android.support.test.rule.ActivityTestRule;
^`
You need to add the DetoxTest.java file in the correct folder (androidTest).
For example:
$ find android/app/src -name '*.java'
android/app/src/androidTest/java/com/[your.package]/DetoxTest.java
android/app/src/main/java/com/onova/[your.package]/MainActivity.java
android/app/src/main/java/com/onova/[your.package]/MainApplication.java

elm-make.exe: getFileAttributesExStandard: does not exist

I followed the instructions to get the latest version of debois/elm-mdl here.
After using elm-github-install to install v9, my app does not want to compile any more. I get the following error:
11:42:35 PM client.1 | Module build failed: Error: Compiler process exited with error Compilation failed
11:42:35 PM client.1 | elm-make.exe: getFileAttributesExStandard: does not exist (The system cannot find the path specified.)
Eventually what worked was to delete the elm-stuff folder and reinstall everything using elm-install.