Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Namespace "goog.string" already declared. #370

Closed
ssmith353 opened this issue Apr 5, 2018 · 4 comments
Closed

Namespace "goog.string" already declared. #370

ssmith353 opened this issue Apr 5, 2018 · 4 comments

Comments

@ssmith353
Copy link

ssmith353 commented Apr 5, 2018

I'm not sure what recently changed, but even after clearing my node_modules folder, I can't run my app, and always get this error in the console.

Uncaught Error: Namespace "goog.string" already declared.
    at Object.goog.provide (bundle.nocsf.js?browserId=other&minifierType=js&languageId=en_US&b=7010&t=1522922183652:180)
    at bundle.nocsf.js?browserId=other&minifierType=js&languageId=en_US&b=7010&t=1522922183652:181
    at Object.<anonymous> (bundle.nocsf.js?browserId=other&minifierType=js&languageId=en_US&b=7010&t=1522922183652:181)
    at Object.<anonymous> (bundle.nocsf.js?browserId=other&minifierType=js&languageId=en_US&b=7010&t=1522922183652:181)
    at t (bundle.nocsf.js?browserId=other&minifierType=js&languageId=en_US&b=7010&t=1522922183652:1)
    at Object.<anonymous> (bundle.nocsf.js?browserId=other&minifierType=js&languageId=en_US&b=7010&t=1522922183652:41)
    at t (bundle.nocsf.js?browserId=other&minifierType=js&languageId=en_US&b=7010&t=1522922183652:1)
    at Object.<anonymous> (bundle.nocsf.js?browserId=other&minifierType=js&languageId=en_US&b=7010&t=1522922183652:180)
    at t (bundle.nocsf.js?browserId=other&minifierType=js&languageId=en_US&b=7010&t=1522922183652:1)
    at Object.<anonymous> (bundle.nocsf.js?browserId=other&minifierType=js&languageId=en_US&b=7010&t=1522922183652:180)

Package.json file:

{
	"csfConfig": {
		"js": {
			"lint": {
				"rules": {
					"no-unknown-property": 0
				}
			}
		},
		"path:**/{js/src/**/*,webpack.config.js}": {
			"js": {
				"lint": {
					"parserOptions": {
						"ecmaVersion": 7
					}
				}
			}
		}
	},
	"dependencies": {
		"cropperjs": "^1.2.2",
		"google-map-react": "0.34.0",
		"immutable": "^3.8.2",
		"lodash": "4.17.4",
		"marble-alert": "^2.1.0",
		"metal": "^2.16.5",
		"metal-css-transitions": "^2.3.5",
		"metal-react": "^3.0.0",
		"metal-redux": "^2.0.1",
		"metal-router": "^3.6.3",
		"moment": "^2.21.0",
		"node-js-marker-clusterer": "^1.0.0",
		"react": "^16.2.0",
		"react-addons-shallow-compare": "^15.6.2",
		"react-bootstrap-table-next": "^0.1.2",
		"react-dates": "^12.7.1",
		"react-dom": "^16.2.0",
		"react-dropzone": "^4.2.5",
		"react-quill": "^1.2.6",
		"react-select": "^1.2.1",
		"react-switch": "^2.3.0",
		"react-tooltip": "^3.4.0",
		"redux": "^3.7.2",
		"redux-immutable": "^4.0.0",
		"redux-thunk": "^2.2.0",
		"scroll-into-view": "^1.9.1",
		"senna": "^2.5.0",
		"string-sub": "^0.0.1",
		"vis": "^4.21.0"
	},
	"devDependencies": {
		"babel-cli": "^6.26.0",
		"babel-core": "^6.26.0",
		"babel-loader": "^7.0.0",
		"babel-plugin-lodash": "^3.2.11",
		"babel-polyfill": "^6.26.0",
		"babel-preset-env": "^1.6.1",
		"babel-preset-metal-jsx": "^0.1.1",
		"babel-preset-stage-2": "^6.24.1",
		"check-source-formatting": "^2.0.5",
		"cross-env": "^5.1.3",
		"webpack": "^3.10.0"
	},
	"main": "src/main/resources/META-INF/resources/js/src/main.js",
	"scripts": {
		"webpack": "cross-env NODE_ENV=production webpack --progress",
		"webpack:dev": "cross-env NODE_ENV=developement webpack --progress",
		"webpack:watch": "cross-env NODE_ENV=development webpack --watch"
	},
	"version": "1.0.0"
}
@ssmith353
Copy link
Author

@jbalsas
Copy link
Contributor

jbalsas commented Apr 5, 2018

Nice catch, @ssmith353!

We actually attempted to fix that lately in 58dec82, so I'd venture that you are not getting the latest 2.16.5 versions of those packages. Otherwise I would expect this to work even if webpack was failing to dedupe them...

@ssmith353
Copy link
Author

hey @jbalsas,
I updated to latest 2.16.5, but thats actually when it broke. Even after clearing cache, updating npm, and clearing/reinstalling many times. The issue persisted. But it looks like the guide you posted to resolved the issue!

Thanks!

@jbalsas
Copy link
Contributor

jbalsas commented Apr 5, 2018

Could you send me a link to the code via mail so I can take a look? THanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants