uniswap v2 fork npm run build failed TypeScript error - user-interface

`npm start is working fine but npm run build is creating issue.
I have changed typescript, esline and react scripts versions but didn't get any success.`

Related

Laravel error when running npm run dev command

When I run npm run dev in the terminal I get the following message:
ERROR in ./resources/js/components/ExampleComponent.vue
Module build failed (from ./node_modules/vue-loader/lib/index.js):
Error: [vue-loader] vue-template-compiler must be installed as a peer dependency, or a compatible compiler implementation must be passed via options.
at loadTemplateCompiler (/portal/node_modules/vue-loader/lib/index.js:21:11)
at Object.module.exports (
(/portal/node_modules/vue-loader/lib/index.js:65:35)
# ./resources/js/app.js 19:35-79
# multi ./resources/js/app.js ./resources/sass/app.scss
Can anyone tell me what this error means and how do I fix it?
I tried to run this command in the terminal, but I am still getting the error.
The command: npm i -D vue-template-compiler
I have also tried to reinstall all of my dependencies, but that didnt work either.

D3v5 Custom Bundle

I'm trying to follow the v4 custom bundle instructions with D3js v5.
Is there another set of instructions for building specific bundles for v5? "prepublish" isn't listed in the script section for the v5 package.json.
Edit 2018-12-12:
So searching through the scripts section, I ran these commands to get D3 V5.7.0 to build:
git clone https://github.com/d3/d3.git
cd d3
npm install
npm run pretest
npm run test
npm run prepublishOnly
I had about 20 errors like this, but still ended up with a d3.js and d3.min.js file to use:
(!) Circular dependency: node_modules/d3-selection/src/selection/index.js -> node_modules/d3-selection/src/selection/select.js -> node_modules/d3-selection/src/selection/index.js

Failed at the # production script. Error running npm run production

I am facing issue while using the following command
npm run production
after execute following command i see following error
ERROR Failed to compile with 5 errors
error in ./resources/assets/sass/app.scss
Module build failed: ModuleBuildError: Module build failed: TypeError: Cannot read property 'map' of undefined
at preparePluginsArray (E:\wamp\www\smm.yasmalik.com\node_modules\svgo\lib\svgo\config.js:64:20)
at module.exports (E:\wamp\www\smm.yasmalik.com\node_modules\svgo\lib\svgo\config.js:32:28)
at new module.exports (E:\wamp\www\smm.yasmalik.com\node_modules\svgo\lib\svgo.js:21:19)
at E:\wamp\www\smm.yasmalik.com\node_modules\postcss-svgo\dist\index.js:95:16
at Object.creator [as postcssSvgo] (E:\wamp\www\smm.yasmalik.com\node_modules\postcss-svgo\node_modules\postcss\lib\postcss.js:150:35)
at E:\wamp\www\smm.yasmalik.com\node_modules\cssnano\dist\index.js:295:40
at Array.forEach (<anonymous>)
at E:\wamp\www\smm.yasmalik.com\node_modules\cssnano\dist\index.js:282:29
at creator (E:\wamp\www\smm.yasmalik.com\node_modules\cssnano\node_modules\postcss\lib\postcss.js:150:35)
at processCss (E:\wamp\www\smm.yasmalik.com\node_modules\css-loader\lib\processCss.js:199:16)
It was issue with my node_modules folder. there were some extra useless packages so simply i just deleted node_modules and install it again with following commands
Step 1
Delete node_modules manually
Step 2
Install the node_modules folder again:
npm i
Step 3
Update existing packages
npm update
That's it!
Probably you have some conflicts with versions of some npm packages.
Try to reinstall npm:
rm -rf node_modules
npm install

Your JET project does not have oraclejet-tooling installed

I recently installed Oracle jet and I haven't made any changes to it. I created my first project today and it's showing error when I try to build it or serve it. I am trying to run it on Visual Studio (I don't this matters tho)
This is the error I am getting
PM> ojet serve ojet : [31mError: Your JET project does not have oraclejet-tooling installed.[0m
At line:1 char:
+ ojet serve
+ ~~~~~~~~~~
+ CategoryInfo : NotSpecified: ([31mError: You... installed.[0m:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
UPDATE: Apparently when I create a new template it is creating an error from there itself the app structure is generated but during invoking mom install it is unable to parse through some certain JSON
Following is the Error:
ojet create ojetnavbar --template=navbar
Processing template: navbar
Your app structure is generated. Continuing with library install.
Performing npm install may take a bit.
Invoking npm install.
npm WARN deprecated coffee-script#1.12.7: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)
npm ERR! Unexpected end of JSON input while parsing near '...oIzTWjIvO8rspcLCK+1pI'
npm ERR! A complete log of this run can be found in:
npm ERR! *location of log*
Error: (during Invoking npm install.) 1
$ npm install -g #oracle/ojet-cli
$ npm install -g #oracle/oraclejet-tooling
$ ojet restore
This will solve your problem
I have sorted out on the issue it was because the JSON npm was trying to parse were mostly cached and due to that a parsing error was occurring
I used npm-cache clean on my PC and all of it ran after that perfectly fine.
I think you need to add oraclejet tooling to your project. Try this:
cd appDir
npm install #oracle/oraclejet-tooling --save
oraclejet-tooling package has been deprecated, you have to use module contains a command-line interface for Oracle JET web and hybrid mobile application development.
See https://www.npmjs.com/package/#oracle/ojet-cli
cd oracle-jet-simple-web
npm install #oracle/ojet-cli --save
For me this helped
npm i #oracle/oraclejet-tooling
Here is the link: npmjs.com/package/#oracle/oraclejet-tooling

With Node 0.12.2 and npm 2.7.4 ionic installation error on windows 7

I am downloaded the node installation file "node-v0.12.2-x64.msi" for 64 bit windows 7 OS. All node and npm commands are working fine. I checked both the node and npm versions.
But when I try to install ionic by the following command:
npm install -g cordova ionic
Its gives me the following error:
npm WARN engine cordova-js#3.9.0: wanted: {"node":"~0.10.x"} (current: {"node":"
0.12.2","npm":"2.7.4"})
npm WARN engine npm#1.3.4: wanted: {"node":">=0.6","npm":"1"} (current: {"node":
"0.12.2","npm":"2.7.4"})
npm WARN engine xmlbuilder#2.2.1: wanted: {"node":"0.8.x || 0.10.x"} (current: {
"node":"0.12.2","npm":"2.7.4"})
npm WARN installMany normalize-package-data was bundled with npm#1.3.4, but bund
led package wasn't found in unpacked tree
npm ERR! tar.unpack untar error C:\Users\Biswarup\AppData\Local\Temp\npm-1484-8b
f97a1e\registry.npmjs.org\request\-\request-2.9.203.tgz
npm ERR! cb() never called!
Biswarup is my username in above all cases.
I check the following links for troubleshooting, but nothing works for me.
https://github.com/npm/npm/wiki/Troubleshooting#error-enoent-stat-cusersuserappdataroamingnpm-on-windows-7
https://github.com/diegonetto/generator-ionic/issues/42
Please guide me, I am totally stuck at that point. Try to removing node js and reinstalling it many times. But nothing goes right.
First of all packages warning you, that it requires nodejs 0.10.x and may be that is a reason.
Another try you can upgrade npm and try to found new version. So here steps to do it:
npm cache clean
npm update -g npm
npm cache clean
Please download Node 0.10.38
I was too having problem with newer version of node.
I have already aswered this in detail https://stackoverflow.com/a/31124491/1276616

Resources