Reputation: 7
I am new in coding and general.Iam tring to do one project... In my VirtualMachine(linux/Deb) i Can open my project (site) but i cant open it in my local network (from another computer but in the same Lnetwork)...
iam try this project (https://github.com/RumeelHussain/Consensys-Academy-Dev-BootCamp-2018-Final-Project/tree/master/Consensys-Academy-Dev-BootCamp-2018-RumeelHussain-Final-Project)
iam using Node : v8.11.4 Npm : 5.6.0 Truffle : v4.1.14 Solidity: v0.4.24
when i start my project i take this
Compiled successfully!
You can now view react-box in the browser.
Local: http://localhost:xxxx/
On Your Network: http://xxx.xxx.x.xxx:xxxx/
Note that the development build is not optimized.
To create a production build, use npm run build.
Good !!!! But in another computer the index.html say
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#000000">
<!--
manifest.json provides metadata used when your web app is added to the
homescreen on Android. See https://developers.google.com/web/fundamentals/engage-and-retain/web-app-manifest/
-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json">
<link rel="shortcut icon" href="sys.png">
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Only files inside the `public` folder can be referenced from the HTML.
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>Mew</title>
</head>
<body>
<noscript>
You need to enable JavaScript to run this app.
</noscript>
<div id="root"></div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.
You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.
To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
</body>
</html>
when i press the command ( npm run build) i take that error
Error :
node scripts/build.js
Creating an optimized production build...
Failed to compile.
Failed to minify the code from this file:
./node_modules/ipfs-api/src/utils/module-config.js:7
in the file /module-config.js code :
'use strict'
const getConfig = require('./default-config')
const sendRequest = require('./send-request')
const multiaddr = require('multiaddr')
module.exports = (arg) => {
const config = getConfig()
if (typeof arg === 'function') {
return arg
} else if (typeof arg === 'object') {
return sendRequest(arg)
} else if (typeof arg === 'string') {
const maddr = multiaddr(arg).nodeAddress()
config.host = maddr.address
config.port = maddr.port
return sendRequest(config)
} else {
throw new Error('Argument must be a send function or a config object.')
}
}
i read general topics about that error without positive results... i appreciate it a lot if someone help me !!! thanks !
Upvotes: 0
Views: 111
Reputation: 435
This package has been deprecated
ipfs-api has been renamed to ipfs-http-client, please update your package.json to get the latest version.
npm install --save ipfs-http-client
Upvotes: 1