I\'ve started using webpack2 (to be precise, v2.3.2
) and after re-creating my config I keep running into an issue I can\'t seem to solve I get (sorry in advance
I'm using "@google-cloud/translate": "^5.1.4" and was truggling with this issue, until I tried this:
I opened google-gax\build\src\operationsClient.js file and changed
const configData = require('./operations_client_config');
to
const configData = require('./operations_client_config.json');
which solved the error
ERROR in ./node_modules/google-gax/build/src/operationsClient.js Module not found: Error: Can't resolve './operations_client_config' in 'C:\..\Projects\qaymni\node_modules\google-gax\build\src' resolve './operations_client_config' ......
I hope it helps someone
For anyone building an ionic app and trying to upload it. Make sure you added at least one platform to the app. Otherwise you will get this error.
Turned out to be an issue with Webpack just not resolving an import - talk about horrible horrible error messages :(
// Had to change
import DoISuportIt from 'components/DoISuportIt';
// To (notice the missing `./`)
import DoISuportIt from './components/DoISuportIt';
Changed my entry to
entry: path.resolve(__dirname, './src/js/index.js'),
and it worked.
In my case, it was due to a broken sym link when trying to npm link a custom angular library to consuming app. After running npm link @authoring/canvas
```"@authoring/canvas": "path/to/ui-authoring-canvas/dist"``
It appear everything was OK but the module still couldn't be found:
When I corrected the import statement to something that the editor could find Link:
import {CirclePackComponent} from '@authoring/canvas/lib/circle-pack/circle-pack.component';
I received this which is mention in the overflow thread:
To fix this I had to:
cd /usr/local/lib/node_modules/packageName
cd ..
rm -rf packageName
In the root directory of the library, run:
a. rm -rf dist
b. npm run build
c. cd dist
d. npm link
In the consuming app, update the package.json with "packageName":"file:/path/to/local/node_module/packageName""
In the root directory of the consuming app run npm link packageName
Add this to your package.json
:
"browser": {
"[module-name]": false
},