We analyse growth dynamics in an economy where the well-being of economic agents depends on three goods: leisure, a free access environmental good and a private good which can be produced by each agent through his own labour input. The private good can be consumed as a substitute for the environmental resource. The production process of the private good by each agent generates negative externalities on the other agents, by depleting the free access natural resource; but it also produces positive externalities by increasing the productivity of labour via a learning-by-doing mechanism of accumulation of knowledge [which is a pure public good]. In this context, we show that attracting steady states may exist which are Pareto-dominated by others where aggregate private consumption and labour productivity are lower. However, negative externalities can also be an engine of desirable growth: the deterioration of the environmental good can play the role of a coordination device leading economic agents to a wider exploitation of positive externalities.